getArray(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™
Retrieves a slice of the SQL ARRAY value designated by this Array object, beginning with the specified index and containing up to count successive elements of the SQL array.
  • Teradata only supports standard mapping.
  • This method is supported for 1-D arrays only.

An array containing up to count consecutive elements of the SQL ARRAY value, beginning with element index.

Note that this routine may return less than count number of elements in the array. Any uninitialized elements in the array are not returned.

Syntax

Object getArray(long  index,
                int  count)
                throws SQLException

Syntax Elements

index
The array index of the first element to retrieve. The first element is at index 1.
count
The number of successive SQL array elements to retrieve.

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 retrieve elements of the array>” is returned.