How to Pivot Data in SQL Server

Sometimes it just makes sense to output a pivoted table, instead of purely columnar data, when running a T-SQL select query. It's easy to think of pivoting as a complex process when being implemented in code (as opposed to the visual environment of Excel for example), however it's actually quite simple once you get the basic premise. Here's a brief example:- Continue Reading →