setArray(Object, long, int) - 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, beginning with the specified index and setting up to count successive elements of the SQL array.

  • This method supports 1-D arrays only.
  • If index is -1 or count is -1, the Array object is completely overwritten starting from the first element. Otherwise, the routine sets elements in the Array object starting from index, up to count elements. It may be possible that less than count elements are set.

Syntax

void setArray(Object  arrayElements,
              long  index,
              int  count)
              throws SQLException

Syntax Elements

arrayElements
An Object consisting of a Java array of element values to be set.
index
The array index of the first element to set. The first element is at index 1.
count
The number of successive SQL array elements to set.

Exceptions

Throws SQLException in the following cases:
  • The method is called for an N-D array. A database specific code “9743 (ERRUDFJAVARRAY)< <Method> cannot be called for N-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.