Peter Larsson

SQLServerCentral Article

Pivot table for Microsoft SQL Server

One of the seeminly more popular enhancements in SQL Server 2005 to T-SQL is the PIVOT operator. There have been quite a few articles, but new author Peter Larsson decomposes in detail how you can perform this operation with previous versions.

4.68 (22)

You rated this post out of 5. Change rating

2007-10-02 (first published: )

75,434 reads

SQLServerCentral Article

How many more Mondays until I retire?

Depending on your age, you may not want to know this number, but as you advance in your career, this might be a problem that you look to solve one day. Peter Larsson takes a few minutes to work out a function in T-SQL that can be used to solve this or any similar question.

5 (3)

You rated this post out of 5. Change rating


13,991 reads


The 5 Best SQL Course for Beginners – Reviews and Guide


In the technologically driven world of 2024, more individuals are finding themselves drawn towards the...

Speaking at SQL Saturday Boston 2023


I’m heading to Boston next week for SQL Saturday Boston 2023. I went to...

SQL Prompt Quick Access to Helper Code


We’ve been doing some events as part of the Redgate Roadshow, and at one...

Read the latest Blogs


checkdbcc date for all database

By lan2022nguyen

CREATE TABLE #tempdblogin ( lastcheck nvarchar(100) ) EXEC sp_MSforeachdb 'USE ? insert into #tempdblogin...

Azure Postgres reliability/management experiences

By CreateIndexNonclustered

I am considering implementing an Azure Postgres DB for use in a part of...

Unable to deploy DACPAC

By LearningDBA

Every time the dev team runs their dacpac, they encounter an issue. "This deployment...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers