Blog Post
SQL Server - Dynamic SQL To Create a Pivot Table
Author
Mandy Doward
Date
October 10, 2017
Length
1 min
SQL Server PIVOT Function With Dynamic Column Groups
A while back one of my delegates asked me if there was a way to create a Pivot Table using the SQL Server SQL PIVOT function, but generating the Pivot Columns dynamically rather than listing a static set of columns.
The answer? Yes.
If yiu are not already familiar with using the PIVIT function I suggest you take a look at the ########### blog
Before launching in to working with dynamic SQL and Transact SQl scripting let’s take a look at the PIVOT function itself and see how it works.
Share This Page
Mandy Doward
Managing Director
PTR’s owner and Managing Director is a Microsoft MCSE certified Business Intelligence (BI) Consultant, with over 30 years of experience working with data analytics and BI.
PTR FAQs
See our FAQs or get in contact for more information on any of our services, solutions, or to start your PTR journey.