15.00 - Possible Predefined Type Source and Target User-Defined Cast Combinations - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

prodname
Teradata Database
vrm_release
15.00
category
Programming Reference
featnum
B035-1184-015K

Possible Predefined Type Source and Target User‑Defined Cast Combinations

The following table lists the acceptable inputs for a predefined data type‑to‑UDT cast and acceptable targets for a UDT‑to‑predefined data type cast.

The table shows that for user‑defined casts, the system supports a degree of implicit predefined data type‑to‑predefined type conversions.

 

Source Input

Source Data Type of CAST Definition

Target Data Type of CAST Definition

Target Output

BYTEINT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

DATE

CHARACTER

VARCHAR

BYTEINT

UDT

UDT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

BYTE

VARBYTE

BLOB

BYTE

VARBYTE

BLOB

CHARACTER

VARCHAR

CLOB

BYTEINT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

DATE

CHARACTER

UDT

UDT

VARCHAR

CLOB

DATE

BYTEINT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

DATE

DATE

TIME

TIME WITH TIME ZONE

CHARACTER

VARCHAR

TIME

TIME WITH TIME ZONE

TIMESTAMP

TIMESTAMP WITH TIME ZONE

CHARACATER

VARCHAR

TIMESTAMP

TIMESTAMP WITH TIME ZONE

INTERVAL YEAR

INTERVAL YEAR TO MONTH

INTERVAL MONTH

INTERVAL YEAR

UDT

UDT

INTERVAL YEAR TO MONTH

INTERVAL MONTH

INTERVAL DAY

INTERVAL DAY TO HOUR

INTERVAL DAY TO MINUTE

INTERVAL DAY TO SECOND

INTERVAL HOUR

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO SECOND

INTERVAL MINUTE

INTERVAL MINUTE TO SECOND

INTERVAL SECOND

INTERVAL DAY

INTERVAL DAY TO HOUR

INTERVAL DAY TO MINUTE

INTERVAL DAY TO SECOND

INTERVAL HOUR

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO SECOND

INTERVAL MINUTE

INTERVAL MINUTE TO SECOND

INTERVAL SECOND

UDT1

UDT1

UDT2

UDT2

UDT

UDT

BYTEINT

BYTEINT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

CHARACTER

VARCHAR

DATE

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

UDT

UDT

BYTE

BYTE

VARBYTE

BLOB

VARBYTE

BLOB

CHARACTER

CHARACTER

VARCHAR

CLOB

BYTEINT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

DATE

TIME

TIME WITH TIME ZONE

TIMESTAMP

TIMESTAMP WITH TIME ZONE

VARCHAR

CLOB

DATE

DATE

BYTEINT

SMALLINT

INTEGER

BIGINT

DECIMAL

NUMERIC

REAL

FLOAT

DOUBLE PRECISION

CHARACTER

VARCHAR

UDT

UDT

TIME

TIME

TIME WITH TIME ZONE

TIME WITH TIME ZONE

TIMESTAMP

TIMESTAMP

TIMESTAMP WITH TIME ZONE

TIMESTAMP WITH TIME ZONE

INTERVAL YEAR

INTERVAL YEAR

INTERVAL YEAR TO MONTH

INTERVAL MONTH

INTERVAL YEAR TO MONTH

INTERVAL MONTH

INTERVAL DAY

INTERVAL DAY

INTERVAL DAY TO HOUR

INTERVAL DAY TO SECOND

INTERVAL HOUR

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO SECOND

INTERVAL MINUTE

INTERVAL MINUTE TO SECOND

INTERVAL SECOND

INTERVAL DAY TO HOUR

INTERVAL DAY TO SECOND

INTERVAL HOUR

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO SECOND

INTERVAL MINUTE

INTERVAL MINUTE TO SECOND

INTERVAL SECOND

ARRAY/VARRAY

ARRAY/VARRAY

XML

 

XML

 

BLOB

BLOB

CLOB

CLOB

DATE

DATE

DECIMAL
NUMERIC

DECIMAL
NUMERIC

NUMBER

NUMBER

FLOAT
REAL
DOUBLE PRECISION

FLOAT
REAL
DOUBLE PRECISION

BYTEINT
SMALLINT
INTEGER
BIGINT

BYTEINT
SMALLINT
INTEGER
BIGINT

NUMBER

NUMBER

NUMERIC

NUMERIC

INTERVAL DAY

INTERVAL DAY

INTERVAL DAY TO HOUR

INTERVAL DAY TO HOUR

INTERVAL DAY TO MINUTE

INTERVAL DAY TO MINUTE

INTERVAL DAY TO SECOND

INTERVAL DAY TO SECOND

INTERVAL HOUR

INTERVAL HOUR

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO SECOND

INTERVAL HOUR TO SECOND

INTERVAL MINUTE

INTERVAL MINUTE

INTERVAL MINUTE TO SECOND

INTERVAL MINUTE TO SECOND

INTERVAL MONTH

INTERVAL MONTH

INTERVAL SECOND

INTERVAL SECOND

XML (continued)

XML (continued)

INTERVAL YEAR

INTERVAL YEAR

INTERVAL YEAR TO MONTH

INTERVAL YEAR TO MONTH

PERIOD

PERIOD

TIME

TIME

TIMESTAMP

TIMESTAMP

TIMESTAMP WITH TIME ZONE

TIMESTAMP WITH TIME ZONE

BYTE
VARBYTE
LONG VARBYTE

BYTE
VARBYTE
LONG VARBYTE

CHARACTER
VARCHAR

CHARACTER
VARCHAR

XML

 

 

 

 

XML

 

 

 

 

BLOB

BLOB

CLOB

CLOB

DATE

DATE

DECIMAL

NUMERIC

DECIMAL

NUMERIC

NUMBER

NUMBER

FLOAT

REAL

DOUBLE PRECISION

FLOAT

REAL

DOUBLE PRECISION

BYTEINT

SMALLINT

INTEGER

BIGINT

BYTEINT

SMALLINT

INTEGER

BIGINT

INTERVAL DAY

INTERVAL DAY

INTERVAL DAY TO HOUR

INTERVAL DAY TO HOUR

INTERVAL DAY TO MINUTE

INTERVAL DAY TO MINUTE

INTERVAL DAY TO SECOND

INTERVAL DAY TO SECOND

INTERVAL HOUR

INTERVAL HOUR

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO MINUTE

INTERVAL HOUR TO SECOND

INTERVAL HOUR TO SECOND

INTERVAL MINUTE

INTERVAL MINUTE

INTERVAL MINUTE TO SECOND

INTERVAL MINUTE TO SECOND

INTERVAL MONTH

INTERVAL MONTH

INTERVAL SECOND

INTERVAL SECOND

INTERVAL YEAR

INTERVAL YEAR

INTERVAL YEAR TO MONTH

INTERVAL YEAR TO MONTH

PERIOD

PERIOD

XML (continued)

XML (continued)

TIME

TIME

TIMESTAMP

TIMESTAMP

TIMESTAMP WITH TIME ZONE

TIMESTAMP WITH TIME ZONE

BYTE

VARBYTE

LONG VARBYTE

BYTE

VARBYTE

LONG VARBYTE

CHARACTER

VARCHAR

CHARACTER

VARCHAR