GetQueryBandValueSP - Teradata Database - Teradata Vantage NewSQL Engine

Application Programming Reference

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
vwf1492987142269.ditamap
dita:ditavalPath
changebar_rev_16_20_exclude_audience_ie.ditaval
dita:id
B035-1090
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

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

Definition

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

Input Parameters

Input Parameter Description
SearchType 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.

Output Parameter

Output Parameter Description
QBValue Value of specified name.

Example: Using GetQueryBandValueSP

CALL SYSLIB.GetQueryBandValueSP(1,'aa',qbval);
 *** Procedure has been executed.
 *** Total elapsed time was 1 second.
QBValue
-------------------------------------
111