Byte-to-Byte Conversion with CAST | Teradata Vantage - Byte-to-Byte Conversion with CAST - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢

ANSI Compliance

CAST is ANSI SQL:2011 compliant, provided the syntax does not specify data attributes.

Syntax

CAST (byte_expression AS
  {
    { byte_data_type | UDT_data_type } [ data_attribute [...] ] |
    data_attribute [...]
  }
)

Syntax Elements

byte_expression

An expression in byte format to be cast to a different data definition.

byte_data_type

The new byte type to which byte_expression is to be converted.

UDT_data_type
A UDT that has a cast definition that casts the byte type to the UDT.
To define a cast for a UDT, use the CREATE CAST statement. For more information on CREATE CAST, see Teradata Vantageā„¢ - SQL Data Definition Language Syntax and Examples.
data_attribute
One of the following data attributes:
  • FORMAT
  • NAMED
  • TITLE