Criteria

S

smeldawg

Is it possible to put more than one criteria in a query? For example; I have
a query to separate teams, I want to show two or more teams together. I'm
sure this is possible. I just don't know what to use to sepatate them.
 
P

Pieter Wijnen

Sure,

WHERE MyField = 'A' Or MyField = 'B'

Or

WHERE MyField In ('A','B')

Make sure to bracket if you mix And & Or

ie
WHERE MyField = 'A' Or MyField = 'B' AND MyField2 = 'X'
is eqvavilient to
WHERE MyField = 'A' Or (MyField = 'B' AND MyField2 = 'X')
and not
WHERE (MyField = 'A' Or MyField = 'B') AND MyField2 = 'X'
which is more likely to be desired

Pieter
 
Top