Abstract
PIVOT is an extremely efficient way to alter the structure of a result set, expanding a single column of values into a set of separate columns. UNPIVOT does the exact opposite, taking a set of columns and resolving them into a single output column. Both of these operators can be very useful in reporting, analytics, or when trying to format existing data into a specific structure as required by an application.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Edward Pollack
About this chapter
Cite this chapter
Pollack, E. (2019). Dynamic Pivot and Unpivot. In: Dynamic SQL. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4318-3_9
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4318-3_9
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4317-6
Online ISBN: 978-1-4842-4318-3
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)