Jumat, 27 Maret 2015

Re: [MS_AccessPros] query with over 300 ID numbers needed in result

 

thank you so much John
I will do that
by the way your book SQL Queries for Mere Mortals is teaching me so much- after bugging you so much I felt I really needed to learn, so I have been reading and doing the exercises in the book. I am no where near done but what I have learned has really helped me understand more. I had never written sql before January, so needless to say I had a steep learning curve. The book  is excellent. Thank you for writing it

Patty

---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Patty-

Build a table to contain all the codes, and perhaps include an indicator as to whether the substance is controlled or not.  Then to pull all controlled medications, you'll end up doing something like:

SELECT tblMeds.*
FROM tblMeds
WHERE MedID IN
(SELECT MedID FROM tblCodes WHERE Controlled = True)

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Mar 27, 2015, at 2:48 AM, pattykf@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I need to write a query to pull out all the medications that are controlled medications. I finally found all the identification codes for all the medications and there are over 300 of them.  Very few of them are numbers that are consecutive numbers so I can't reduce the number that I need to a lower number of factors.  Is 300 too many in the query for it to run?
I really appreciate your support
thank you
Patty



__._,_.___

Posted by: pattykf@cox.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar