17.10 - getQueryBandValue(String QBandBuf, int QB_SearchType, String QBName) - 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)

Search the transaction, session, and/or profile name-value pairs in the query band string pointed to by the QBandBuf input argument and retrieve the value for a specified name.

Syntax

getQueryBandValue(String QBandBuf, int QB_SearchType, String QBName)

Syntax Elements

QBandBuf
A query band string, where the query band can be:
  • Returned by QueryBand.getQueryBand()
  • Retrieved from the DBC.DBQLogTbl.QueryBand column
  • Specified by the caller
QB_SearchType
Specifies whether getQueryBandValue() searches for name-value pairs in the transaction, session, and/or profile query band.
If the value is...
  • QueryBand.QB_FIRST, then 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, getQueryBandValue() searches the name-value pairs in the following order:
    • Transaction query band
    • Session query band
    • Profile query band
  • QueryBand.QB_TXN, then 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.
  • QueryBand.QB_SESSION, then 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.
  • QueryBand.QB_PROFILE, then 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.