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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Johnph
Posting Yak Master

103 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
6065 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
Posting Yak Master

103 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
6065 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  
 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.04 seconds. Powered By: Snitz Forums 2000