468,777 Members | 2,381 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,777 developers. It's quick & easy.

noob access question

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
3 1175
<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
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
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.

Similar topics

1 post views Thread by Dave Williams | last post: by
10 posts views Thread by Matt Hollingsworth | last post: by
8 posts views Thread by Ivan Shevanski | last post: by
3 posts views Thread by steve | last post: by
2 posts views Thread by Dan McCollick | last post: by
reply views Thread by AndyW | last post: by
8 posts views Thread by azz131 | last post: by
6 posts views Thread by Lang Murphy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.