Here are the basic steps to use TD_ANYTYPE parameters in a routine:
- Allocate a buffer to hold information about the TD_ANYTYPE input and result parameters.
- Call FNC_GetAnyTypeParamInfo to retrieve information about the TD_ANYTYPE arguments passed to the routine.
- 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.
- 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.
- Free the memory allocated for the buffer.