Links about SQL PIVOT

One of my colleagues asked how to create SQL query to show results as columns of a row, that actually stored in multiple rows in the table. Other co-worker suggested to use cursor to manually generate required rows.
I’ve found a few links about SQL PIVOT.  
It is easy to start with
http://www.kodyaz.com/articles/t-sql-pivot-tables-in-sql-server-tutorial-with-examples.aspx
or http://programmingsolution.net/post/SQL-Server-Pivot-Converting-Rows-to-Columns-with-Dynamic-Query.aspx

More detailed are articles written by Itzik Ben-Ganhttp://www.sqlmag.com/article/tsql3/pivot-or-unpivot-your-data
and
http://www.sqlmag.com/content1/topic/pivot-or-unpivot-your-data/catpath/tsql3/page/2compaslightly  

How to use Pivoting Without Aggregation is described inhttp://www.sqlmag.com/article/tsql3/pivoting-without-aggregation

posted @ Saturday, May 12, 2012 7:34 PM
Print

Comments on this entry:

No comments posted yet.

Your comment:



(not displayed)

 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456