SQL 2005 SELECT Statement "NOT CONTAINS 'cat'"

Here's the SQL statement I'm trying to execute!
SELECT       DISTINCT merchantCategory
FROM            dbo.Items
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.
Who is Participating?
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
SELECT   DISTINCT merchantCategory
FROM     dbo.Items
 WHERE merchantCategory NOT LIKE '%cat%'
CCongdonConnect With a Mentor Commented:
Building from angellll's query, you might change the WHERE to read

WHERE merchantCategory NOT LIKE 'cat%'

if what you are looking for STARTS with the phrase 'cat' Othewise, you might block something that mereley has the phrase cat in the middle of it. Like the word 'scathing' -- sCAThing.
jumpstart0321Author Commented:
Thanks guys:)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.