Usage Notes | ARRAY_GET | VantageCloud Lake - ARRAY_GET Usage Notes - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

ARRAY_GET takes an array expression as an argument and returns the element value in array_expr that corresponds to the position specified by array_index.

If array_expr is a one-dimensional ARRAY type, the index of the element to be located is defined by an INTEGER or an ArrayVec type that must be within the defined boundaries of array_expr.

If array_expr is a multidimensional ARRAY type, the index of the element to be located is defined using the predefined array type ArrayVec. See ARRAY Scope Reference. The number of dimensions defined by ArrayVec must be between 2 and 5 (the maximum number of dimensions supported) and must correspond to the number of dimensions in array_expr. The values for each dimension are separated by a comma and must be within the defined boundaries of array_expr.

If the value of array_index references an element of the ARRAY which is in an uninitialized state, an error is returned. To avoid referencing an element of the ARRAY that is uninitialized, set any uninitialized elements to NULL. You can do this with the OEXTEND method. See OEXTEND.

If array_expr is NULL, the function returns NULL.