By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

noob access question

P: n/a
I have this silly query in access 2003, i keep needing to remove
certain id's from the result,
but its gotten so big i'm getting error 3360 access, "query is to
complex"

This is the problem part:

(Drug.DrugID)<>269083 And (Drug.DrugID)<>269093 And
(Drug.DrugID)<>265292 And (Drug.DrugID)<>269031 And
(Drug.DrugID)<>269900 And (Drug.DrugID)<>270072 And
(Drug.DrugID)<>269886 And (Drug.DrugID)<>268833 And
(Drug.DrugID)<>267963 And (Drug.DrugID)<>269894 And
(Drug.DrugID)<>269894 And (Drug.DrugID)<>267963 And
(Drug.DrugID)<>270351 And (Drug.DrugID)<>271438 And
(Drug.DrugID)<>271554 And (Drug.DrugID)<>268806 And
(Drug.DrugID)<>269387 And (Drug.DrugID)<>268793 And
(Drug.DrugID)<>269036 And (Drug.DrugID)<>269085 And
(Drug.DrugID)<>268801 And (Drug.DrugID)<>268685 And
(Drug.DrugID)<>269083 And (Drug.DrugID)<>259452 And
(Drug.DrugID)<>268726 And (Drug.DrugID)<>269844 And
(Drug.DrugID)<>269400 And
How to i just say
(Drug.DrugID) <(270351 271373 or 270259 or 271554 or
270825,268791,268348,270466,271554,271438,268738,2 69094,26999

the commas and OR , doesnt seem to work, and i've been searching i
can't find an example of the syntax to make a list.

Oct 6 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
<sc************@googlemail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I have this silly query in access 2003, i keep needing to remove
certain id's from the result,
but its gotten so big i'm getting error 3360 access, "query is to
complex"

This is the problem part:

(Drug.DrugID)<>269083 And (Drug.DrugID)<>269093 And
(Drug.DrugID)<>265292 And (Drug.DrugID)<>269031 And
(Drug.DrugID)<>269900 And (Drug.DrugID)<>270072 And
(Drug.DrugID)<>269886 And (Drug.DrugID)<>268833 And
(Drug.DrugID)<>267963 And (Drug.DrugID)<>269894 And
(Drug.DrugID)<>269894 And (Drug.DrugID)<>267963 And
(Drug.DrugID)<>270351 And (Drug.DrugID)<>271438 And
(Drug.DrugID)<>271554 And (Drug.DrugID)<>268806 And
(Drug.DrugID)<>269387 And (Drug.DrugID)<>268793 And
(Drug.DrugID)<>269036 And (Drug.DrugID)<>269085 And
(Drug.DrugID)<>268801 And (Drug.DrugID)<>268685 And
(Drug.DrugID)<>269083 And (Drug.DrugID)<>259452 And
(Drug.DrugID)<>268726 And (Drug.DrugID)<>269844 And
(Drug.DrugID)<>269400 And
How to i just say
(Drug.DrugID) <(270351 271373 or 270259 or 271554 or
270825,268791,268348,270466,271554,271438,268738,2 69094,26999

the commas and OR , doesnt seem to work, and i've been searching i
can't find an example of the syntax to make a list.
Drug.DrugID Not In(269083, 269093, etc.,)

Oct 6 '06 #2

P: n/a
Thank you so much for the quick reply !

now i can finally go home :)
Rick Brandt wrote:
<sc************@googlemail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
I have this silly query in access 2003, i keep needing to remove
certain id's from the result,
but its gotten so big i'm getting error 3360 access, "query is to
complex"

This is the problem part:

(Drug.DrugID)<>269083 And (Drug.DrugID)<>269093 And
(Drug.DrugID)<>265292 And (Drug.DrugID)<>269031 And
(Drug.DrugID)<>269900 And (Drug.DrugID)<>270072 And
(Drug.DrugID)<>269886 And (Drug.DrugID)<>268833 And
(Drug.DrugID)<>267963 And (Drug.DrugID)<>269894 And
(Drug.DrugID)<>269894 And (Drug.DrugID)<>267963 And
(Drug.DrugID)<>270351 And (Drug.DrugID)<>271438 And
(Drug.DrugID)<>271554 And (Drug.DrugID)<>268806 And
(Drug.DrugID)<>269387 And (Drug.DrugID)<>268793 And
(Drug.DrugID)<>269036 And (Drug.DrugID)<>269085 And
(Drug.DrugID)<>268801 And (Drug.DrugID)<>268685 And
(Drug.DrugID)<>269083 And (Drug.DrugID)<>259452 And
(Drug.DrugID)<>268726 And (Drug.DrugID)<>269844 And
(Drug.DrugID)<>269400 And
How to i just say
(Drug.DrugID) <(270351 271373 or 270259 or 271554 or
270825,268791,268348,270466,271554,271438,268738,2 69094,26999

the commas and OR , doesnt seem to work, and i've been searching i
can't find an example of the syntax to make a list.

Drug.DrugID Not In(269083, 269093, etc.,)
Oct 6 '06 #3

P: n/a
You can make a table of the 'bad' ID's (or a query that selects them based
on some criteria) and then you can say:

Select whatever from Drug where Drug.DrugID not in (select DrugID from
yourTableOrQuery)

that might make it easier to add and remove ID's from the list
-John

<sc************@googlemail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I have this silly query in access 2003, i keep needing to remove
certain id's from the result,
but its gotten so big i'm getting error 3360 access, "query is to
complex"

This is the problem part:

(Drug.DrugID)<>269083 And (Drug.DrugID)<>269093 And
(Drug.DrugID)<>265292 And (Drug.DrugID)<>269031 And
(Drug.DrugID)<>269900 And (Drug.DrugID)<>270072 And
(Drug.DrugID)<>269886 And (Drug.DrugID)<>268833 And
(Drug.DrugID)<>267963 And (Drug.DrugID)<>269894 And
(Drug.DrugID)<>269894 And (Drug.DrugID)<>267963 And
(Drug.DrugID)<>270351 And (Drug.DrugID)<>271438 And
(Drug.DrugID)<>271554 And (Drug.DrugID)<>268806 And
(Drug.DrugID)<>269387 And (Drug.DrugID)<>268793 And
(Drug.DrugID)<>269036 And (Drug.DrugID)<>269085 And
(Drug.DrugID)<>268801 And (Drug.DrugID)<>268685 And
(Drug.DrugID)<>269083 And (Drug.DrugID)<>259452 And
(Drug.DrugID)<>268726 And (Drug.DrugID)<>269844 And
(Drug.DrugID)<>269400 And
How to i just say
(Drug.DrugID) <(270351 271373 or 270259 or 271554 or
270825,268791,268348,270466,271554,271438,268738,2 69094,26999

the commas and OR , doesnt seem to work, and i've been searching i
can't find an example of the syntax to make a list.

Oct 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.