I am trying to use pivot on a table to rotate(Transpose) the table but i m not getting how to do that.
I want to know how it actually works. i found many egs but i was not able to understant how those work.
How tis is working, i just want to transpose my rows into cols and cols into rows Say i have 31 cols for day1 day2 and so on up to day 31 and a foreign key EmpId now i want to rotate day1 day2
EmpId Day1 Day2 Day3
----------
1 A P P
2 P P p
Here i want to rotate table like this
Exp 1 2 3 as EmpId
----------
Day1 A P ....
Day2 P P ...
Day3 P P ...
and so on