I have a table full of data and I am looking to take the contents from one row and add it into column headers and then put its corresponding value below it in that column! The issue that I am trying to describe is best shown by the tables below:
Normal Table
Once this table has been created (this is a temporary table) I want to reconstruct the table to look like this
But I have searched everywhere on line and I can't seem to find out how to do this anywhere! I would be very grateful for the help!
Dynamic Pivot code for MS SQL
try this
Use
Dynamic Pivot
to do this.