GetQueryBand Function | Application Programming Reference | Teradata Vantage - GetQueryBand - 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 string for the current transaction, session, and profile.

Syntax

REPLACE FUNCTION SYSLIB.GetQueryBand (
) RETURNS VARCHAR(12304)CHARACTER SET UNICODE,
  ...
;

Usage Notes

The GetQueryBand function can be used in a SELECT statement and an input parameter for a table function.

This function 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.

Example: Using GetQueryBand

SELECT GetQueryBand();

Result:

 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 1 second.
GetQueryBand()
-------------------------------------------------------------------
=S> a=1;b=2;c=3;d=4;

Related Information

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.

For information on setting a profile query band, see CREATE PROFILE in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.