rajeshsur
Grasshopper
Points: 11
More actions
June 30, 2009 at 12:16 pm
#139388
Hi,
How to Convert Dynamic rows into columns of varchar type
Name Content Value
Test Column1 Yellow
Test Column2 Red
Test Column3 Green
Test1 Column1 Yellow1
Test1 Column2 Red1
Test1 Column3 Green1
should look like
Name Column1 Column2 Column3
Test Yellow Red Green
Test1 Yellow1 Red1 Green1
Elliott Whitlow
SSC Guru
Points: 102402
June 30, 2009 at 1:27 pm
#1017902
It feels like a PIVOT operation..
See SQL 2005 BOL (November 2008)
ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/udb9/html/24ba54fc-98f7-4d35-8881-b5158aac1d66.htm
If that doesn't help ask for clarification..
CEWII
Florian Reischl
SSC-Dedicated
Points: 37301
June 30, 2009 at 1:32 pm
#1017908
Or Jeff's really fine articles about cross-tabs
http://www.sqlservercentral.com/articles/T-SQL/63681/
and
http://www.sqlservercentral.com/articles/cross+tab/65048/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply