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

What’s New at AWS re:Invent 2025 – Day 1 Highlights

By

Day 1 is an absolute thrill at re:Invent! I normally dedicate this dynamic day...

Running SQL Server on KubeVirt – Getting Started

By

With all the changes that have happened with VMware since the Broadcom acquisition I...

Why is shrinking IT budgets a good thing?

By

Each year around this time, companies enter the familiar ritual of budgeting. For many,...

Read the latest Blogs

Forums

Adding a Lot of Seconds

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Adding a Lot of Seconds

SQL Server Licensing is Simple

By Steve Jones - SSC Editor

Comments posted to this topic are about the item SQL Server Licensing is Simple,...

Stairway to Azure SQL Hyperscale Level 5: Data Growth and Fast Auto-Grow Mechanism

By Chandan Shukla

Comments posted to this topic are about the item Stairway to Azure SQL Hyperscale...

Visit the forum

Question of the Day

Adding a Lot of Seconds

When does this code work and when does it fail?

DECLARE @BaseDate DATETIME = '1900-01-01';

SELECT DATEADD(SECOND, 2147483648, @BaseDate) AS [MaxIntSecondsAdded];

See possible answers