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

sanjay5219
Posting Yak Master

240 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
Flowing Fount of Yak Knowledge

2780 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

3873 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  
 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.09 seconds. Powered By: Snitz Forums 2000