setResultSet_nD(ResultSet) - 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 an SQL N-D ARRAY value designated by this Array object with values provided in the input ResultSet. Element values in the Array object are set starting from the lowest value of the first column (according to row-major order) to the highest.

  • This method supports N-D arrays only.
  • Fewer than the maximum number of elements specified in the ResultSet may be set in the Array, in case the Array was constructed with fewer elements.

Syntax

void setResultSet_nD(ResultSet  arrayResultSet) 
                                    throws SQLException

Syntax Elements

arrayResultSet
A ResultSet consisting of two columns, an index and an element value.
The result set passed as input must contain one row for each array element, with two columns in each row:
  • The first column is of type List<Integer>, where the list contains n coordinates corresponding to a particular element.
  • The second column stores the element value.
The rows are in ascending order corresponding to the order of the indices.

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 Array elements with provided ResultSet>” is returned.