Mahmoud ElMansy: knowledge meant to be free

The Magic of T-SQL Pivot

Pivot is commonly used in reports to enhance the view for the selected data and make better format for the selected data
Now Let us discus it in more details
The syntax for PIVOT as in Microsoft MSDN

SELECT ,
[first pivoted column] AS ,
[second pivoted column] AS ,
...
[last pivoted column] AS FROM
( Logging In...

Profile