Syntax - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™
void
FNC_GetQueryBandValue ( void            *QBandBuf,
                        FNC_QBSearch_et  SearchType 
                        void            *QBName,
                        void            *QBValue )

Syntax Elements

QBandBuf
A pointer to a buffer containing the query band, where the query band can be:
  • Returned by FNC_GetQueryBand
  • Retrieved from the DBC.DBQLogTbl.QueryBand column
  • Specified by the caller
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.
QBName
The name in the name-value pair to return the value for.
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.