pivot

External Article

Script to create dynamic PIVOT queries in SQL Server

  • Article

Pivoting is a common reporting requirement - data is stored in columns and you need to present it in rows. This was a nice feature that was added to SQL Server, but you don't always know all of the values you need to pivot on. This tip looks at how you can dynamically create the pivot command to handle these unknown values.

2012-11-09

5,308 reads

Blogs

Is Cataloging Your Data Important?

By

Data continues to be the lifeline for companies across the globe. As maturity levels...

Daily Coping 20 Mar 2023

By

Today’s coping tip is to get outside and notice how the weather feels. This...

Tales From The Field Weekly Wrap Up for the Week of 03-13-2023 & SQLBits 2023

By

 Hello Dear Reader!  What an incredible week we had.  I started off traveling on...

Read the latest Blogs

Forums

Azure SQL - Restore to lower enviornment

By PJ_SQL

Hello! Backups are automated for Azure SQL Prod environment, we can do point-in-time recovery...

Bcp queryout issue

By kakovatos7

Hi all, I am running the following query in SQL, trying to export some...

SQL Server RLS Database Users and Login User Permission

By Irakli Lomidze

Please suggest practice on SQL Server RLS On the database level, defined users with...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers