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.

External Article

Pagination and ordering by large values

Pagination is a technique for limiting output. Think of Google search results, shopping the electronics category on Amazon, or browsing tagged questions on Stack Overflow. Nobody could consume all of the results in a single shot, and no site wants to spend the resources required to present them all to us

Blogs

Bicep Your Elastic Jobs

By

I posted on Terraform and Azure SQL last year but wanted to see what...

Check Azure SQL DB Space Used

By

A couple of days ago I was doing some cleaning on some Azure SQL...

Get row counts of all tables in a Microsoft Fabric warehouse

By

I loaded some built-in sample data from Wide World Importers into a Fabric warehouse....

Read the latest Blogs

Forums

SSRS Web Service URL - getting rid of HTTP

By cphite

Not sure if this is the place to ask, but will give it a...

SQL Server software and windows version compatibility level

By Abhishek

Is there a specific platform or website where I can verify the compatibility between...

Truncate tables where Referential Integrity exists

By Perry Whittle

Comments posted to this topic are about the item Truncate tables where Referential Integrity...

Visit the forum

Question of the Day

Post Restore Tasks for the Resource Database

I backup the Resource database from my SQL Server 2022 instance. I then install CUs 1, 2, 3, and 4. I have an issue and need to restore my Resource database from backup. Is there anything I need to do after restoring this database?

See possible answers