Usage Notes - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantageā„¢
Column names specified just before the FOR clause are referred to as measure_columns in the context of UNPIVOT operation. Column names specified after the FOR clause are referred to as unpivot_columns.

Similar to the PIVOT operator, columns with CLOB, BLOB, UDT, XML, or JSON data types are not allowed with the UNPIVOT operator.

The UNPIVOT column name and measure column names cannot be the same as the column names defined in the derived_table_name.

When multiple measure_columns are involved in UNPIVOT operation, the columns are compatible only if they belong to any of the following three groups:
  • CHAR and VARCHAR
  • BYTE and VARBYTE
  • BYTEINT SMALLINT INTEGER BIGINT REAL DECIMAL NUMBER

Column names specified in the IN list cannot be specified in the assign list of the SELECT statement.