FIELD2 = 1 or 2 or 3 or 4 or 5 or 6
is always true as nonzero numbers evaluate as true. The above expression is really Field2 = 1 or True or True or True...
Rewrite it as:
Field2 = 1 or Field2 = 2 or Field2 = 3
Field2 > 1 and Field2 < 6
Thanks Phil. Should I use additional parenthesis? such as:
Field1 = 8 and (Field2 = 1 or Field2 = 2 or Field2 = 3); _RESULT_
The Parenthesis as you've used them won't affect the result. You can use them if it makes the expression clearer to you.
It's my preference to group with parenthesis this way:
( Field1 = 8 ) and ( Field2 = 1 ) or ( Field2 = 2 ) or ( Field2 = 3 )
My brain finds that easier to read as it groups the boolean comparisons and I don't have to stop and ask myself: (what's the order of operations rule that applies here...)