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 2008 Forums
 Transact-SQL (2008)
 comma delimited string

Author  Topic 

cjcclee
Starting Member

33 Posts

Posted - 2013-12-06 : 22:32:39
Hi,all

I have table

ID string
1 value1,value2,value3
2 value8,value7
3 value5


another table store the value1, 2 etc
this table return:
Value1
value2
value6
value4

I want get any ID that string contains value from second table
I want result be:
ID string
1 value1,value2

How to do it?
Thanks for help!

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-12-06 : 22:46:09
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/rowset-string-concatenation-which-method-is-best.aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -