Usage Notes | OEXTEND | Teradata Vantage - Usage Notes - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
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.