16.20 - UDT Expression - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Administration
Programming Reference
Publication ID
B035-1210-162K
Language
English (United States)

Purpose

Returns a distinct or structured UDT data type.

Syntax



database_name
An optional qualifier for the column_name.
table_name
An optional qualifier for the column_name.
column_name

The name of a distinct or structured UDT column.

Constructor methods have the same name as the UDT with which they are associated.

A qualifier for column_name.

udf_name

The name of a distinct or structured UDT data type.

Constructor methods have the same name as the UDT with which they are associated.

argument

An argument to the UDF.

An argument to pass to the constructor.

An argument to pass to the method.

Parentheses must appear even though the argument list may be empty.

CAST

A CAST expression that converts a source data type to a distinct or structured UDT.

Data type conversions involving UDTs require appropriate cast definitions for the UDTs. 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, B035-1144.

expression
An expression that results in a UDT data type.
udt_name

The name of a distinct or structured UDT data type.

Constructor methods have the same name as the UDT with which they are associated.

NEW
An expression that constructs a new instance of a structured type and initializes it using the specified constructor method.
SYSUDTLIB.

The database in which the constructor exists.

Teradata Database only searches the SYSUDTLIB database for UDT constructors, regardless of whether the database name appears in the expression.

constructor_name

The name of a constructor method associated with a UDT.

Constructor methods have the same name as the UDT with which they are associated.

method_name
The name of an instance method that returns a UDT.