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™
void
FNC_GetQueryBandValueU ( void            *QBandBuf,
                         FNC_QBSearch_et  SearchType, 
                         void            *QBName,
                         void            *QBValue, 
                         word            QBCharType,
                         word            NameCharType);
void *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
FNC_QBSearch_et SearchType
Whether FNC_GetQueryBandValue (or FNC_GetQueryBandValueU) searches the transaction, session, and/or profile name-value pairs in the query band string for the name specified by QBName.
FNC_QBSearch_et is defined in sqltypes_td.h and includes the following values:
  • QB_FIRST specifies to return the value of the first name-value pair, where the name is specified by the QBName input argument. If the query band string contains name-value pairs for the transaction, session, and profile, FNC_GetQueryBandValue (or FNC_GetQueryBandValueU) searches the name-value pairs in the following order:
    • Transaction query band
    • Session query band
    • Profile query band
  • QB_TXN specifies to search the transaction name-value pairs in the query band and return the value that corresponds to the name specified by the QBName input argument.
  • QB_SESSION specifies to search the session name-value pairs in the query band and return the value that corresponds to the name specified by the QBName input argument.
  • QB_PROFILE specifies to search the profile name-value pairs in the query band and return the value that corresponds to the name specified by the QBName input argument.
void *QBName
The name in the name-value pair to return the value for.
void *QBValue
A pointer to a buffer in which FNC_GetQueryBandValue (or FNC_GetQueryBandValueU) returns the value corresponding to the name specified by QBName.
The buffer must be large enough to return the value plus a null terminator.
word QBCharType
The character set of the query band string in QBandBuf.
Supported values:
  • 1 (LATIN)
  • 2 (UNICODE)
word NameCharType
The character set of the query band name in QBName.
Supported values:
  • 1 (LATIN)
  • 2 (UNICODE)