Criteria

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

Guest

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top