
I am trying to use the "Not Equal" command in Sql but it does not seem to be working. I want to get the total count when all the 3 fields (status1, status2 and status3) are not equal to Yes. For some reason I am getting 0 records.
SELECT
COUNT(ID) from [maintable]
WHERE
status1 <> 'YES'
and status2 <> 'YES'
and status3 <> 'YES'
The above query does not generate any results. What am i doing wrong here? Thanks