SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Preventing Multiple Cases
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Johnph
Yak Posting Veteran

95 Posts

Posted - 09/09/2013 :  15:07:15  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 09/09/2013 :  15:13:13  Show Profile  Reply with Quote
This should do it:

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

Be One with the Optimizer
TG
Go to Top of Page

Johnph
Yak Posting Veteran

95 Posts

Posted - 09/09/2013 :  15:16:48  Show Profile  Reply with Quote
TG THANK YOU!
Go to Top of Page

TG
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 09/09/2013 :  15:19:15  Show Profile  Reply with Quote
you're welcome.

Be One with the Optimizer
TG
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000