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

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.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 TIME, TIMESTAMP, DECIMAL or NUMBER data type, the table function can use getPrecision() to get the precision of the data type.

Syntax

getPrecision(int index)

Syntax Elements

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

Exceptions

If the index argument specifies an array element that is not a TIME, TIMESTAMP, DECIMAL or NUMBER column, getPrecision() throws an SQLException to indicate that Tbl.getPrecision(int) is invalid for the type of column intended, setting the SQLException fields as follows.

SQLState Field vendorCode Field
“TS000” 7849