Cowmaster's Corner
Simple answers. Now.
Wednesday, September 12, 2012
SQL - Transpose Columns to rows
Convert column headers into row values, and expand row values into multiple rows under a single column using UNPIVOT
Great example here
http://blog.logiclabz.com/sql-server/transpose-columns-to-rows-in-sql-server-2005-using-unpivot.aspx
https://stackoverflow.com/questions/20111418/sql-server-transpose-rows-to-columns
https://blogs.oracle.com/sql/how-to-convert-rows-to-columns-and-back-again-with-sql-aka-pivot-and-unpivot
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment