Usage Notes | ONEXT | Teradata Vantage - Usage Notes - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

ONEXT takes an array expression as an argument and returns the subscript of the element subsequent to the element specified by integer_value or array_bound, if that element is currently populated. If you specify an element subscript that is greater than or equal to the value of OLAST for the array, a NULL is returned. Also, if integer_value or array_bound is NULL, an error is returned.

If array_expr is a one-dimensional ARRAY type, ONEXT returns an unsigned INTEGER value. If array_expr is a multidimensional ARRAY type, ONEXT returns a new instance of the predefined ARRAY type ArrayVec, containing the subscript information. If the array is empty (all elements of the array are in an uninitialized state), then ONEXT returns NULL.

If array_expr is NULL, an error is returned.

The ONEXT method with one INTEGER argument is compatible with the Oracle NEXT method for one-dimensional ARRAY types.