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.
| Author |
Topic |
|
DBCowboy
Starting Member
26 Posts |
Posted - 2003-02-28 : 12:11:26
|
| Okay, I know the technique from http://www.sqlteam.com/item.asp?ItemID=2368 for creating a comma delimited list.However, I need to create a comma delimited list based off of another parameter in the table.In other words, I have the data like so:Name1 | Value1Name1 | Value2Name2 | Value3Name2 | Value4And I need to transform the results to:Name1 | Value1,Value2Name2 | Value3,Value4In a table or table variable. There may be more than two names, and I can't know in advance how many there will be of either names, or values, since this is going into a stored procedure that will take input.Is there any way to do this without using a cursor? All I've been able to come up with is a list of all values for each name, or a method using a cursor to parse each name's value separately.Hopefully someone's got a solution for me!Thanks!Jaysen |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
DBCowboy
Starting Member
26 Posts |
Posted - 2003-02-28 : 12:42:09
|
| Thanks, was searching for "comma separated value" and didn't find it. |
 |
|
|
|
|
|