Examples Usage Notes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
  • Columns in table T that are not included in any of the column lists are called copy columns, and are included in every row of the output.
  • Value column names and the UNPIVOT column name must not exist in table T.
  • The names in column_list_value must exist in table T.
  • The number of VALUE_COLUMNS must be equal to the number of columns in each column list. One column list defines which source columns get mapped to the value columns for one row of output.
  • Column alias list values are names that are used for the UNPIVOT_COLUMN to indicate what source column or columns data is in the value columns for that row.

    If specified, the number of alias names must be equal to the number of column lists.

    If not specified, column alias names default to the names of the columns in the column list, concatenated with an '_'.

  • The UNPIVOT_COLUMN is a VARCHAR(1000).
  • If INCLUDE_NULLS = 'yes', there are exactly n rows of output for every row of input, where n is the number of column lists.

    If INCLUDE_NULLS = 'no', then there are at most n rows of output for every row of input, where n is the number of column lists. Any row with NULLS for every value column is eliminated.