Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Preventing Multiple Cases

Author  Topic 

Johnph
Posting Yak Master

103 Posts

Posted - 2013-09-09 : 15:07:15
I have a like clause like this:
WHERE COLUMN LIKE CAT1%
or
COLUMN LIKE CAT2%
or
COLUMN LIKE CAT3%
ETC..


I want to know if it is possible just have one like clause from 1-9:
CAT1, CAT3, ...., CAT9

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-09-09 : 15:13:13
This should do it:

where column like 'CAT[1-9]%'

Be One with the Optimizer
TG
Go to Top of Page

Johnph
Posting Yak Master

103 Posts

Posted - 2013-09-09 : 15:16:48
TG THANK YOU!
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-09-09 : 15:19:15
you're welcome.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -