Convert Column into Row | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Convert Column into Row

Hai Guys How do I concatenate strings from a column into a single row? For Example IDValue
1Test1
2Test2
3Test3
4Test4
5Test5 I Need Test1Test2Tset3Test4Test5Test6
Or
Test1,test2,test3,test4
S.Gnana Prakash
Is this in SQL 2005, if not please ensure to post your thread in relevant forums. Refer to COALESCE function in books online. Furtherhttp://databases.aspfaq.com/general…-strings-from-a-column-into-a-single-row.html best example. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing.
Where do you want to show data?
If you use front end application, do concatenation there Also refer this
http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx?Pending=true
Madhivanan Failing to plan is Planning to fail
]]>