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 |
|
saurabh122
Starting Member
16 Posts |
Posted - 2010-03-02 : 22:31:46
|
| Hello,I want to append a result set of a particular column to a string. How do I achieve the same? Example:ColumnResult1Result2Result3The string variable should return me: Result1Result2Result3How do I do it using T Sql?Thanks |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2010-03-02 : 22:47:14
|
Select STUFF((SELECT '' + COL FROM TABLEFOR XML PATH('')), 1, 0,'') |
 |
|
|
|
|
|