16.20 - SQL Definitions for the Cast Method - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

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

The following CREATE METHOD statement installs the cast method in the database:

CREATE METHOD VarcharCast()
   RETURNS VARCHAR(80)
   FOR circle_t
   EXTERNAL NAME 'CS!c_cast!udmsrc/c_cast.c!F!circle_t_Cast';

The following statement registers the VarcharCast UDM as a cast routine for the circle_t UDT:

CREATE CAST (circle_t AS VARCHAR(80))
   WITH SPECIFIC METHOD circle_t_Cast
   AS ASSIGNMENT;