January 15, 2021 at 3:20 pm
I am trying to use this logic
((1 OR 2) OR 6 OR 7 OR 8)) AND 3 AND 4 AND 5
I tried this but, it is not retuning the right count
select count(*)
from "mytable"
where
((Column1 ='Yes' OR Column2 ='Yes')
OR
(Column6='Yes' OR Column7='Yes' OR Column8='Yes'))
AND
Column3 = 'Customer'
AND
Column4 ='US'
AND
Column5='Dead'
January 15, 2021 at 3:47 pm
((1 OR 2) OR (6 OR 7 OR 8)) AND 3 AND 4 AND 5
Is exactly the same as:
(1 OR 2 OR 6 OR 7 OR 8) AND 3 AND 4 AND 5
Did you actually want:
(1 OR 2) AND (6 OR 7 OR 8) AND 3 AND 4 AND 5
?
January 15, 2021 at 4:26 pm
Thanks @sscoach
These pesky And/Ors. They always confuse me
Yes, what I actually want is (1 OR 2) AND (6 OR 7 OR 8) AND 3 AND 4 AND 5
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply