GetQueryBandSP Procedure | Application Programming Reference | Teradata Vantage - GetQueryBandSP - 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 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(TheQueryBand);

Result:

 *** 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;