Pivot function in sql server 2008
- by Ranjana
how to carry out the pivot function
i have a table with datas
Day Period subject fromtime totime
Monday 1st English 9:30 10:15
Monday 1st English 9:30 10:15
Monday 5th English 1:30 2:20
Monday 8th English 3:40 4:30
but i need the format as
day period(1st) 2nd 3rd...... 5th... 8th
Monday 1st nill nill 5th 8th
english english english
Tuesday .......
In this way.
How to Perform the pivot function to get in this format.
Please help me out........