ARRAY_AGG

Teradata Vantageā„¢ Data Types and Literals

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

Purpose

An aggregate function for use with ARRAY data types that allows arrays to be created as part of the SELECT list of a query.

Syntax



TD_SYSFNLIB.
Name of the database where the function is located.
element_value_expr
An expression that evaluates to an ARRAY element type.
value_expression
An expression that evaluates to a Teradata data type that can be compared.
ASC
Results are to be ordered in ascending sort order.
If the sort field is a character string, the system orders it in ascending order according to the definition of the collation sequence for the current session.
The default order is ASC.
DESC
Results are to be ordered in descending sort order.
If the sort field is a character string, the system orders it in descending order according to the definition of the collation sequence for the current session.
array_expression
An ARRAY expression, which is one of the following:
  • A reference to an ARRAY column
  • An ARRAY constructor expression
  • A UDF expression
  • A UDM expression