16.20 - SQL Definitions for the Transform 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 transform method in the database:

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

You must add the circle_t_ToSql UDF before executing the following CREATE TRANSFORM statement. For the definition and C code of the circle_t_ToSql UDF, see C Scalar Functions for UDT Functionality .

The following statement registers a UDF called circle_t_ToSql and the circle_t_FromSql UDM as transform routines for the circle_t UDT:

CREATE TRANSFORM FOR circle_t
   circle_t_IO (TO SQL WITH SPECIFIC FUNCTION circle_t_ToSql,
      FROM SQL WITH SPECIFIC METHOD circle_t_FromSql);