15.10 - GetQueryBand - Teradata Database

Teradata Database Application Programming Reference

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1090-151K

Returns the concatenated query band string for the current transaction, session, and profile.

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

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” on page 19.

The GetQueryBand function returns the concatenated transaction, session, and profile query bands.

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

For information on setting the query band for a session or transaction, see SET QUERY_BAND in SQL Data Definition Language.

For information on setting a profile query band, see CREATE PROFILE in SQL Data Definition Language.