method_specification - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™
INSTANCE
The method signature being defined is an instance method.
This is the default.
SYSUDTLIB
An optional keyword that indicates that method_name is being created in the SYSUDTLIB database.
All methods must be created within the SYSUDTLIB database.
method_name
Name for the method whose signature being added to the type definition for UDT_name.
CAST FROM
The result predefined data type returned by the external function that is to be converted to the type specified by the RETURNS clause.

For example:

...RETURNS DECIMAL(9,5) CAST FROM FLOAT...
You cannot specify a character server data set of KANJI1. Otherwise, the system returns an error to the requestor.
Whenever a LOB that requires data type conversion is passed to a method, the LOB must first be materialized for the conversion to occur.
specific_method_name
Specific name of the method whose signature is being added to the type definition for UDT_name. Optionally, you can specify containing database name, which is SYSUDTLIB.
SELF AS RESULT
Specifies that the method is type-preserving.
If you specify SELF AS RESULT, then the data type specified in the RETURNS clause for the method must have the same name as UDT_name.