O'Reilly logo

Microsoft SQL Server 2012 Integration Services: An Expert Cookbook by Pedro Perfeito, Reza Rad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Pivot and Unpivot Transformations

Pivoting data means separating different row values from one column into separate columns; if it is the other way round, Unpivot terminology is used. The following screenshot shows a sample of Pivot data:

Pivot and Unpivot Transformations

As the previous data shows, there are multiple rows for each ProductID, but different OrderQuantity entries for different OrderYear entries in each row. A Pivot can be applied on this data and it can fetch out each different OrderYear entry as a different column and the value of each equivalent OrderQuantity can appear in its appropriate column, and as a result, one row will be needed for each product. The following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required