Using TD_ANYTYPE Parameters in a Routine | Teradata Vantage - Using TD_ANYTYPE Parameters in a Routine - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
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.
    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.