FNC_TblGetCtrlCtx Function | C Library Functions | Teradata Vantage - 17.10 - FNC_TblGetCtrlCtx - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

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

Get the address of a previously-allocated control scratchpad to retain data between iterations of a local table function copy.

FNC_TblGetCtrlCtx returns the address of the control scratchpad that a local table function copy can use to retain data between iterations.

The return value is a NULL pointer if the general scratchpad has not been previously allocated with a call to FNC_TblAllocCtrlCtx.

Use this library function when the return value of FNC_GetPhase is TBL_MODE_CONST, indicating that the SELECT statement invoked the table function with constant expression input arguments.

For example:

FROM TABLE (table_function_1('STRING_CONSTANT'))
AS table_1;