Usage Notes

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

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.