16.20 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2020-03-25
dita:mapPath
xzf1512079057909.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
kby1472250656485
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.