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

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

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.
    Vantage 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.