setArray_nD(Object, List<Integer>, List<Integer>) - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

Sets a slice of the SQL ARRAY value designated by this Array object using the element values passed in arrayElements. The slice of elements to be modified is designated by lower bound coordinates specified in lowerBounds and upper bound coordinates specified in upperBounds.

  • This method supports N-D arrays only.
  • If the coordinates specified by lowerBounds and upperBounds are set to -1, the Array object is completely overwritten starting from the lowest coordinate value.
  • This routine may set less than the full slice of elements in the array. Any section of the slice outside of the boundaries of the array are ignored.

Syntax

void setArray(Object  arrayElements,
              List<Integer>  lowerBounds,
              List<Integer>  upperBounds)
                throws SQLException

Syntax Elements

arrayElements
An Object consisting of a Java array of element values to be set.
lowerBounds
The array index of the first element to set in the slice.
upperBounds
The array index of the last element to set in the slice.

Exceptions

Throws SQLException in the following cases:
  • The method is called for a 1-D array. A database specific code “9743 (ERRUDFJAVARRAY)< <Method> cannot be called for 1-D Arrays >” is returned.
  • An error occurs while attempting to access the array. A database specific code “9743 (ERRUDFJAVARRAY) <Failed to set elements of the array>” is returned.