Mayur  Gujrathi

Mayur Gujrathi

  • 374
  • 4.1k
  • 1m

convert Columns to rows

Jan 1 2020 6:34 AM
I have data in below format in sql server 
 
YRC a b c d e f
201903 305.39 983 -95.71 -814.68 72.61 378
201803 198.56 693.93 -207.34 -379.77 106.83 305.39
201703 193.25 688 -342.1 -340.58 5.32 198.56
 
 
Need to convert in below format 
 
201903 201803 201703 Columnname
305.39 198.56 193.25 a
983 693.93 688 b
-95.71 -207.34 -342.1 c
 
 
Please help  

Answers (5)