Vishwas Kadamannaya

Vishwas Kadamannaya

  • 1.6k
  • 122
  • 142.2k

Pivoting to a Single Column in SQL

Mar 4 2013 2:09 AM
Hi All,

I have a Database table structure in the following format..

IDValue
100ADE
100BCD
100CEF
101MNO
101PQR
101XYZ
102EFG

I want a query to retrieve the results of table in the following format.

IDResults
100ADE,BCD,CEF
101MNO,PQR,XYZ
102EFG

I know that we can accomplish this by PIVOT Keyword but not able to finalize the query, can you guys help me out Please

Thanks in Advance
Vishwas






Answers (2)