GetQueryBandValueSP Procedure | Application Programming Reference | Teradata Vantage - GetQueryBandValueSP - Teradata Vantage - Analytics Database

Application Programming Reference

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
qld1628112131956.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ajo1472244909562
lifecycle
latest
Product Category
Teradata Vantageā„¢

Returns the value of the specified name in the current query band.

Syntax

REPLACE PROCEDURE SYSLIB.GetQueryBandValueSP (
  IN SearchType SMALLINT,
  IN QBName VARCHAR (129) CHARACTER SET UNICODE,
  OUT QBValue VARCHAR(257) CHARACTER SET UNICODE
)
  ...
;

Syntax Elements

SearchType
Search type:
  • 0 = Return the value of the first name-value pair where name is specified by the QBName input argument.

    If the query band contains name-value pairs for the transaction and session, the function searches the transaction name-value pairs first.

  • 1= 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.
  • 2 = 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.
  • 3 = 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
Name in the query band pair to search for.
QBValue
Value of specified name.

Example: Using GetQueryBandValueSP

CALL SYSLIB.GetQueryBandValueSP(1,'aa',qbval);

Result:

 *** Procedure has been executed.
 *** Total elapsed time was 1 second.
QBValue
-------------------------------------
111