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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Select Query

Author  Topic 

sanjay5219
Posting Yak Master

240 Posts

Posted - 2014-08-27 : 08:35:28
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
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-08-27 : 08:41:09
[code]
like '1234,%'
[/code]
Go to Top of Page

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-08-27 : 08:42:02
[code]','+col1+',' LIKE '%,1234,%'[/code]
Go to Top of Page
   

- Advertisement -