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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Select Query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sanjay5219
Posting Yak Master

228 Posts

Posted - 08/27/2014 :  08:35:28  Show Profile  Reply with Quote
Hi All,

I have data in below format in table1 col1

1234,3456,12345,4567,4567,5677,4567,123

Now I want to search a value "1234" in above table I can not use like operator her as it will return 123 also

Please suggest

gbritton
Aged Yak Warrior

857 Posts

Posted - 08/27/2014 :  08:41:09  Show Profile  Reply with Quote

like '1234,%'
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3661 Posts

Posted - 08/27/2014 :  08:42:02  Show Profile  Reply with Quote
','+col1+',' LIKE '%,1234,%'
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.05 seconds. Powered By: Snitz Forums 2000