Excluding Specific Information

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to run a query were I have one field that contains over 100
different type of service calls. I want to exclude certain calls. I tried:

Not "Voided Record" or "Lunch"

but it still showed lunch calls?

Thanks like always JEN
 
Jen said:
I am trying to run a query were I have one field that contains over 100
different type of service calls. I want to exclude certain calls. I tried:

Not "Voided Record" or "Lunch"

but it still showed lunch calls?

Thanks like always JEN

Hi Jen. A quick primer on order of precedence and boolean logic:

The expression
Not A Or B
is interpreted as
Not A
Or
B

Meaning, the expression is satisfied (true) if A is false, or B is true.
Per your example, you would get exactly the results you observed.

If you want to exclude both A and B, you could use the expressions
Not A And Not B
or
Not (A Or B)
or, as Duane suggested, a shortcut that is very handy when more than one
or two operands are involved:
Not In (A, B)

The latter can be extended to as many items as you wish to include (with
some bounds I suppose).

HTH
 
Back
Top