17.10 - Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)
FNC_QB_Pair_t *
FNC_GetQueryBandPairsU ( void            *QBandBuf,
                         FNC_QBSearch_et  SearchType,
                         int             *NumPairs,
                         word             QBCharType );

Syntax Elements

QBandBuf
A pointer to a buffer containing the query band, where the query band can be:
  • Returned by FNC_GetQueryBandU
  • Retrieved from the DBC.DBQLogTbl.QueryBand column
  • Specified by the caller
SearchType
Whether FNC_GetQueryBandPairsU searches for name-value pairs in the transaction, session, and/or profile query band.
FNC_QBSearch_et is defined in sqltypes_td.h and includes the following values:
  • QB_FIRST specifies to return the first unique name-value pair for each name found in the transaction, session, and profile query bands. If the transaction, session, and profile query bands contain the same name, FNC_GetQueryBandPairsU returns the first name-value pair found in the query band in the following order:
    • Transaction query band
    • Session query band
    • Profile query band
  • QB_TXN specifies to return name-value pairs in the transaction query band.
  • QB_SESSION specifies to return name-value pairs in the session query band.
  • QB_PROFILE specifies to return name-value pairs in the profile query band.
NumPairs
The number of name-value pairs that FNC_GetQueryBandPairsU returns.
QBCharType
The character set of the query band string in QBandBuf.
Supported values:
  • 1 (LATIN)
  • 2 (UNICODE)