GetQueryBandSP - 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 concatenated query band for the current transaction and session.

Definition

REPLACE PROCEDURE SYSLIB.GetQueryBandSP
   (OUT queryband VARCHAR(12304) CHARACTER SET UNICODE
   )
            .
            .
            .
;

Usage Notes

The GetQueryBandSP procedure retrieves the query band directly from memory.

This procedure is created in the SYSLIB database by the DEM DIP script. EXECUTE privileges are granted to PUBLIC by default. For more information, see Requirements for Using the API.

For information on setting the query band for a session or transaction, see SET QUERY_BAND in Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144.

Output Parameter

The query band output parameter contains the concatenated transaction, session, and profile query bands.

Example: Using GetQueryBandSP

CALL SYSLIB.GetQueryBandSP(qb);
 *** Procedure has been executed.
 *** Total elapsed time was 1 second.
queryband
-----------------------------------------------------------------
=T> aa=123;bb=yxs;cc=mmmmm; =S> a=1;b=2;c=3;d=4;