16.20 - TD_UNPIVOT and UNPIVOT Query as a Source to PIVOT - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ NewSQL Engine Release Summary

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Release Notes
featnum
B035-1098-162K

The PIVOT function supports the UNPIVOT syntax or TD_UNPIVOT function as a source for the PIVOT operator.

The PIVOT/ UNPIVOT operator is a single dimensional way of interchanging the data, such as converting rows to columns or columns to rows.

You can also swap both the rows and columns within a single query; for example, using UNPIVOT as the source query to PIVOT. This allows for more flexibility for two-dimensional methods of interchanging data in a table.

Benefits

  • Allows you to change table data two-dimensionally.
  • You do not need to know the number of columns returned by UNPIVOT operator to use as PIVOT source.

Additional Information

For more information, see "PIVOT" in Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates, B035-1145.