Syntax - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™
FNC_Mode
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 {
    TBL_PRE_INIT=20,
    TBL_INIT=21,
    TBL_BUILD=22,
    TBL_FINI=23,
    TBL_END=24,
    TBL_ABORT=25,
    TBL_BUILD_EOF=26
} 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.