Usage Notes - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

The character set of a UDF is determined by the character set of the user that creates the function. Therefore, if the user creating a UDF has a character set of LATIN, the UDF has a character set of LATIN. If the user creating a UDF has a character set of UNICODE, the UDF has a character set of UNICODE. FNC_GetQueryBand assumes the input character parameters are in the function character set and returns the output parameters in the same character set.

This interface can be called by a UDF, UDM, or external stored procedure to retrieve the current query band, a string of name-value pairs that can be set on a session, transaction, or profile to identify the originating source of queries and help manage task priorities and track system use.

IF you want to … THEN use the …
set the query band for a session or transaction SET QUERY_BAND SQL statement.

For details, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.

add or modify a query band for a profile
  • CREATE PROFILE
  • MODIFY PROFILE

For details, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.

get transaction, session, or profile name-value pairs from the query band string that FNC_GetQueryBand returns FNC_GetQueryBandPairs function.

For details, see FNC_GetQueryBandPairs.

search the transaction, session, or profile name-value pairs in the query band string that FNC_GetQueryBand returns and get the value that corresponds to a specific name FNC_GetQueryBandValue function.

For details, see FNC_GetQueryBandValue.