Eg:-A table. It consists of three columns and three rows.
name id dept
a 1 x
b 2 y
c 3 z
I want the resultant table should look like this
a b c
1 2 3
x y z
Whether it's possible ?
Check this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=326394&SiteID=1
You will need to add some value to the rows to uniquely identify the rows when you pivot (but you could do this in a CTE or temp table.
No comments:
Post a Comment