This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - PIVOT and UNPIVOT Table Examples

SQL SERVER – PIVOT and UNPIVOT Table Examples

June 7, 2008
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Joins, SQL Scripts

If you PIVOT a table and then UNPIVOT it, do you get the original back? Not always. My PIVOT and UNPIVOT table examples show why aggregation loses data.

Read More
SQL Server Unpivot Table.

SQL SERVER – UNPIVOT Table Example

May 29, 2008
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Function, SQL Scripts

UNPIVOT Table is the reverse of PIVOT. This AdventureWorks example turns state columns back into rows, and shows why the detail rows do not return.

Read More
PIVOT table example.

SQL SERVER – PIVOT Table Example

May 22, 2008
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Scripts, SQL Server

A PIVOT Table example on AdventureWorks that counts addresses by state, plus why UNPIVOT cannot always give you back the original rows.

Read More
Previous 1 2
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com