getLength(int index) - 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™

If a table function with dynamic result row specification calls Tbl.getColDef(), and the value of an element in the resulting array corresponds to a CHAR, BYTE, CHARACTER CHARACTER SET GRAPHIC, VARCHAR CHARACTER SET GRAPHIC, VARCHAR, VARBYTE or NUMBER data type, the table function can use getLength() to get the length of the data type.

Syntax

getLength(int index)

Syntax Elements

index
Index of array element whose length is to be returned.

Exceptions

If the index argument specifies an array element that is not a CHAR, BYTE, CHARACTER CHARACTER SET GRAPHIC, VARCHAR CHARACTER SET GRAPHIC, VARCHAR, VARBYTE or NUMBER column, getLength() throws an SQLException to indicate that Tbl.getLength(int) is invalid for the type of column intended, setting the SQLException fields as follows.

SQLState Field vendorCode Field
“TS000” 7848