16.20 - TD_UNPIVOT - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Administration
Programming Reference
Publication ID
B035-1210-162K
Language
English (United States)

Purpose

Transforms table columns into rows.

Syntax



TD_SYSFNLIB.
Name of the database where the function is located.
tableName
The name of the table with the input data for the function.
query_expression
The SELECT statement with input data for the function.
VALUE _COLUMNS
Specifies the destination column or columns for the unpivoted data.
UNPIVOT_COLUMN
Specifies the name of the output column identifying the unpivoted data in each row of the value column of columns.
COLUMN_LIST
Specifies the input column data for the unpivoting operation.
COLUMN_ALIAS_LIST
Specifies alternate names for the values in the unpivoted column.
INCLUDE_NULLS
Specifies whether or not to include nulls in the transformation. Valid values:
  • ‘Yes'
  • ‘No’ (default)