View Full Version : Problems with "or"


jbphoenix
07-30-2007, 03:28 PM
I'm trying to exclude several customers from a query.

Here is what I have for the query -
Field:CustomerID
Table: SalesSumLine
Criteria: Not ="4016002" Or "4433001" Or "4481001" Or "4709001" Or "5100019"

When I run the query only the first customer ID is not in the result set. The rest of the ID's are still in the result in set.

How do I get the rest of the ID's not to appear in the query results?

boblarson
07-30-2007, 03:30 PM
Edited - instead of AND use the IN function:

Not In("4016002","4433001","4481001","4709001","5100019")