evaluate Yes/No field

  • Thread starter Thread starter shank
  • Start date Start date
S

shank

I have a query that works fine until I add the following...

.... AND PR.ATU='Yes' ORDER BY....

I've tried....
.... AND PR.ATU='True' ORDER BY....
.... AND PR.ATU <> 'No' ORDER BY....
.... AND PR.ATU=1 ORDER BY....

PR.ATU is a Yes/No field.
I get a Data Mismatch error.
Remove the above and the query runs fine.
How do you evaluate a Yes/No field?

thanks!
 
a Yes/No field is a Boolean data type, the values are True/False (no single
or double quotes, which are used for Text values, not Boolean), or the
numeric equivalent which is -1/0.
I've tried....
... AND PR.ATU='True'

try
.... AND PR.ATU = True

notice there are no quotes.

hth
 
Back
Top