Pivoting
Pivoting is a technique that allows you to rotate rows to columns, possibly performing aggregations along the way. The number of applications for pivoting is simply astounding. In this section, I’ll present a few, including pivoting attributes in an Open Schema environment, solving relational division problems, and formatting aggregated data. Later in the chapter and also in other chapters in the book, I’ll show additional applications. As usual for this book, I’ll present solutions that apply to versions earlier than SQL Server 2005 as well as solutions that use newly introduced specialized operators and therefore work only in SQL Server 2005.
Pivoting Attributes
I’ll use open schema as the scenario for pivoting attributes. Open schema ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access