getResultSet_nD() - 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™

Retrieves a result set holding all the elements of the n-D array.

  • Teradata only supports standard mapping.
  • This method supports only N-D arrays.
  • This method is a Teradata extension.

A ResultSet object containing all the elements of the N-D array.

The result set has one row for each element of the SQL array, with the first row containing the first present element in the array, in row-major order.

The result set has up to the number of rows corresponding to the number of elements present in the array. For n-D arrays, the column type of the first row is of List<Integer>, where the list contains n coordinates corresponding to the particular element being referenced.

For example, for a 2-D array, the List<Integer> column for a given row would consist of 2 elements (n,m). For a 5-D array, the List<Integer> column for a given row would consist of 5 elements (a,b,c,d,e).

The index values for the first column of the ResultSet are based on the lower and upper bounds defined for the array. Therefore, if the array type is defined with lower bounds that are some other value than 1, the index values for the first column of the ResultSet will begin with that same lower bound accordingly.

The rows containing the array elements are output in row-major order.

Any uninitialized elements in the array are not returned.

Syntax

ResultSet getResultSet_nD() throws SQLException

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 retrieve result set of Array elements>” is returned.