setArray_nD(Object, List<Integer>, List<Integer>) - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

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

Parameters

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.