16.20 - CAST FROM data type - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

The result type returned by the method that is to be converted to the type specified by the RETURNS clause.

If you specify a CAST FROM clause, there must be an existing cast from the “result cast from” data type to the returns data type.

Example:

  ...RETURNS DECIMAL(9,5) CAST FROM FLOAT...

If data type is a UDT, then the appropriate cast and transform must be defined to handle its conversion. See CREATE CAST and REPLACE CAST and CREATE TRANSFORM and REPLACE TRANSFORM .

Whenever a LOB that requires data type conversion is passed to a method, the LOB must first be materialized for the conversion to take place.

If data type contains a locator indication, then you cannot specify a CAST FROM clause for the method.