getLength(int index) - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
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.

Argument

The index argument specifies which element in the array returned by Tbl.getColDef() to get the length of.

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