17.10 - getScale(int index) - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

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 DECIMAL or NUMBER data type, the table function can use getScale() to get the scale of the DECIMAL or NUMBER type.


getScale(int index)

Syntax Elements

Index of array element whose scale is to be returned.


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

SQLState Field vendorCode Field
“TS000” 7850