16.20 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)

To get information about the TD_ANYTYPE input and output arguments passed to an external routine:

  1. Declare an integer variable, such as numAnytypeParams.
  2. Allocate sufficient memory for the AnyTypeAttributeArray buffer to hold information for all of the TD_ANYTYPE input and result parameters declared in your routine. This should be an array of anytype_param_info_eon_t structures, where each element of the array will contain the information for a particular TD_ANYTYPE parameter.
  3. Call FNC_GetAnyTypeParamInfo_eon and pass in a pointer to the AnyTypeAttributeArray buffer along with the size of the buffer, and a pointer to numAnytypeParams.

The FNC_GetAnyTypeParamInfo_eon function fills the AnyTypeAttributeArray buffer with information about each TD_ANYTYPE parameter. The information for the return type of a TD_ANYTYPE result parameter is contained in the last element of the array. The number of TD_ANYTYPE parameters is returned in the numAnyTypeParams parameter.

Be sure to free the memory allocated to the AnyTypeAttributeArray buffer when you have completed processing the information.