|
|
Question : SQL 2005 SELECT Statement "NOT CONTAINS 'cat'"
|
|
Here's the SQL statement I'm trying to execute! SELECT DISTINCT merchantCategory FROM dbo.Items WHERE NOT CONTAINS 'cat' In other words, I want it to cough up all the unique results for merchantCategory that don't contain the keyword 'cat'. I know the syntax is wrong somewhere around 'cat'; I'm just not sure what it is. Please help, Thanks, Chris.
|
Answer : SQL 2005 SELECT Statement "NOT CONTAINS 'cat'"
|
|
SELECT DISTINCT merchantCategory FROM dbo.Items WHERE merchantCategory NOT LIKE '%cat%'
|
|
|
|
|