TRYCAST | Data Types and Literals | VantageCloud Lake - TRYCAST - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

TRYCAST tries to cast a string to a data type specified after the AS keyword (similar to CAST). If the conversion fails, TRYCAST returns a NULL instead of failing.

The result of the conversion is returned unless there is an error, in which case a NULL is returned. The result data type is whatever data type was specified by the data_type input.