CAST Character-to-Numeric Conversion | VantageCloud Lake - Character-to-Numeric Conversion with CAST - 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

ANSI Compliance

This statement is ANSI SQL:2011 compliant.

As an extension to ANSI, CAST permits the use of data attributes, such as the FORMAT phrase that enables alternative formatting for the numeric data.

Syntax

CAST (
  character_expression AS numeric_data_type
  [ data_attribute [...] ]
)

Syntax Elements

character_expression

A character expression to be converted.

numeric_data_type
The numeric type to which character_expression is to be converted.
data_attribute
One of the following data attributes:
  • FORMAT
  • NAMED
  • TITLE