Using TD_ANYTYPE Parameters in a Routine | Teradata Vantage - Using TD_ANYTYPE Parameters in a Routine - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Here are the basic steps to use TD_ANYTYPE parameters in a routine:

  1. Allocate a buffer to hold information about the TD_ANYTYPE input and result parameters.
  2. Call FNC_GetAnyTypeParamInfo to retrieve information about the TD_ANYTYPE arguments passed to the routine.
  3. Execute the appropriate code according to the data type and information returned by FNC_GetAnyTypeParamInfo for each input parameter. Return a runtime error if a data type is not supported by the routine.
    Teradata Database does not perform implicit data type conversions for TD_ANYTYPE parameters.
  4. Execute the appropriate code according to the requested data type of the return parameter. Return a runtime error if the requested return type is not supported by the routine.
  5. Free the memory allocated for the buffer.