Usage Notes | OEXTEND | 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ā„¢

OEXTEND takes an array expression as an argument and allocates space for one or more new elements in the array.

IF you specify... THEN the method...
OEXTEND() appends a single NULL element to the ARRAY value. For a multidimensional (n-D) ARRAY, this is done in row-major order.
OEXTEND(num_spaces) appends n NULL elements to the ARRAY value, where n = num_spaces. For an n-D ARRAY, this is done in row-major order.
OEXTEND(num_spaces,index_value)

or

OEXTEND(num_spaces, array_bound)

appends n copies of the element indexed by either index_value or array_bound to the ARRAY value, where n = num_spaces. For an n-D ARRAY, this is done in row-major order.

The OEXTEND method with zero, one, or two arguments of INTEGER type is compatible with the Oracle EXTEND method, for one-dimensional ARRAY types. However, the empty set of parentheses required when OEXTEND is called with no arguments is a deviation from Oracle syntax.

OEXTEND returns an error in the following cases:
  • If array_expr is NULL.
  • If either index _value or array_bound is NULL.
  • If the number of elements appended by OEXTEND overflows the maximum size of the array.

If num_spaces is NULL, no error occurs, but no action is taken by OEXTEND.