Avatar of Murray Brown
Murray Brown
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

SQL Not Equal To not working as expected

Hi
I have a table called [Descriptions] with a column called [Other]. Half of the records on this table
have the word "Stope" in. The following SQL shows all these records
Select * From Descriptions Where Shaft = 'masimong air' And Other = 'Stope'

Open in new window


but this SQL query does not show the other 20 records that do not have the word "Stope" in.
Select * From Descriptions Where Shaft = 'masimong air' And Other <> 'Stope'

Open in new window


Why does the second query not work properly?
Microsoft SQL Server

Avatar of undefined
Last Comment
Murray Brown

8/22/2022 - Mon