16.20 - getQueryBandPairs(String QBandBuf, int QB_SearchType) - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Returns transaction, session, or profile name-value pairs from the query band string QBandBuf.

Arguments

Argument Description
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 getQueryBandPairs() searches for name-value pairs in the transaction, session, and/or profile query band.
If the value is...
  • QueryBand.QB_FIRST, then 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, getQueryBandPairs() returns the first name-value pair found in the query band in the following order:
    • Transaction query band
    • Session query band
    • Profile query band
  • QueryBand.QB_TXN, then return name-value pairs in the transaction query band.
  • QueryBand.QB_SESSION, then return name-value pairs in the session query band.
  • QueryBand.QB_PROFILE, then return name-value pairs in the profile query band.

Return Value

The encoding of the byte array is a name followed by a value, then a name followed by a value, and so forth, where, if the server character set is LATIN, a '\0' delimits each item and if the server character set is UNICODE, two '\0' delimit each item.