Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 6: Creating Rows Of Data Using The UNPIVOT Operator

The UNPIVOT operator does just the opposite of the PIVOT operator, which we looked at in the previous level. By using the PIVOT operator we can take multiple rows of data and create as single row as output. The UNPIVOT operator will take values from a single row and will create multiple rows. Microsoft introduced the UNPIVOT operator when they rolled out SQL Server 2005. In this level I will be showing you different examples of how to use the UNPIVOT 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