Using SQL Server 2014 Management Studio, I've been trying to find a way to convert
Year Name Col1 Col2 Col3 Col4 Col5
----------------------------------------------------
2015 ABC 0.24 0.00 0.21 0.79 0.00
2015 XYZ 0.25 0.00 0.00 0.71 0.29
to
Date Name Col Value
---------------------------
2015 ABC Col1 0.24
2015 ABC Col2 0.00
2015 ABC Col3 0.21
2015 ABC Col4 0.79
2015 ABC Col5 0.00
2015 XYZ Col1 0.25
2015 XYZ Col2 0.00
2015 XYZ Col3 0.00
2015 XYZ Col4 0.71
2015 XYZ Col5 0.29
in a dynamic fashion (i.e. it should work for any table like the first one, with n number of columns)
I've been looking around at general pivot function and doesn't seem to solve my problem.