Click here to Skip to main content
15,885,278 members
Articles / Database Development / SQL Server

Calculate aggregates for dynamic columns using UNPIVOT

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
17 Jan 2013CPOL3 min read 31.3K   48   5  
This tip describes how to calculate an aggregate for dynamically defined columns using UNPIVOT clause.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Europe Europe
Biography provided

Comments and Discussions