Tag Archives: Pivot

T-SQL Pivots a Table

This post demos how to pivot a table using both the Pivot function and a home made approach. The code can be found from GIST. Problem An OrderItem table contains orderId, itemName and qty as its columns. Now we want … Continue reading

Posted in Database | Tagged , , | 1 Comment