GetQueryBandSP Procedure | Application Programming Reference | Teradata Vantage - 17.10 - GetQueryBandSP - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Application Programming Reference

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1090-171K
Language
English (United States)

Returns the concatenated query band for the current transaction and session.

Syntax

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

Syntax Elements

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

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.

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;