SQL Definitions for the Transform Method - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

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);