16.20 - Syntax - 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)
FNC_GetPhaseEx(FNC_Phase *Phase,
               int        option)
FNC_Phase *Phase
The processing phase in which the function was called and the action that the table function should perform.
FNC_Phase is defined as:
typedef enum FNC_Phase {
} FNC_Phase;
For the meanings of FNC_Phase values, see Processing Phase.
int option
A value of 0-5.
The sqltypes_td.h header file provides the following constants that you can use:
#define TBL_NOOPTIONS  0
#define TBL_LASTROW    1
#define TBL_NEWROW     2
#define TBL_NEWROWEOF  4
A value of 3 specifies both TBL_NEWROW and TBL_LASTROW options.
A value of 5 specifies both TBL_NEWROWEOF and TBL_LASTROW options.