Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 5: Turning Data On Its Side Using PIVOT Operator

The PIVOT operator was added to the Transact-SQL language in SQL Server 2005. It allows you to turn your row data on its side, so it can be presented as column data. This is useful when you want take unique column values and have them displayed as column headings, where the column headings are associated with summarized values displayed below each column heading. In this article I will be exploring how to use the PIVOT operator.

Blogs

In Memory of Andrew Clarke, AKA Phil Factor

By

One of the parts of getting older that really sucks is I seem to...

Leading Through the Noise: Harnessing Data in the Age of Digital Overload

By

The New Leadership Frontier In today’s digital landscape, leaders are no longer just visionaries....

A New Word: Anderance

By

anderance – n. the awareness that your partner perceives the relationship from a totally...

Read the latest Blogs

Forums

taking the rcsi dive

By stan

Hi, we put together an extract that runs every 15 minutes against what i...

Parameter Sensitive Plan Optimization in SQL Server 2022

By Deepam Ghosh

Comments posted to this topic are about the item Parameter Sensitive Plan Optimization in...

Minimum Change Tracking Retention

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Minimum Change Tracking Retention

Visit the forum

Question of the Day

Minimum Change Tracking Retention

If I am running this code:

ALTER DATABASE AdventureWorks2017 SET CHANGE_TRACKING = ON (CHANGE_RETENTION=xxx);
What is the minimum amount of time I can set?

See possible answers