16.20 - IGNORE QUERY_BAND VALUES - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
English (United States)
Last Update
Defines the set of name-value pairs to ignore if specified in a SET QUERY_BAND statement for all users assigned the profile. When a user with the profile issues a SET QUERY_BAND statement containing a name-value pair matching a IGNORE QUERY_BAND VALUES name-value pair, the system performs the following actions:
  • The matching name-value pair is ignored.
  • The query band is set with the remaining name-value pairs.
  • A warning message displays.

You must enclose the set of name=value pairs for the query band with APOSTROPHE characters (').

The number of name=value pairs is limited to the maximum length of the string, which is 4,096 UNICODE characters, including pad characters.

Pair names and values cannot contain any of the following characters:
  • a null
Setting a pair_name to an empty string value indicates that a name-value pair with the pair_name and any value will be discarded. For example:
To specify multiple values for the same pair_name, each name-value pair must be specified separately. For example:

If an APOSTROPHE character is embedded within a pair name or value, you must type it twice, to escape it. Otherwise, the system interprets it as a pair_name=pair_value string terminator.

Keywords to introduce query band options to ignore.
Name component of a query band specification.
The maximum size for each pair_name is 128 UNICODE characters. For more information about database object names, see Teradata Vantage™ SQL Fundamentals, B035-1141.
Value component of a query band specification.
pair_value can be up to 256 UNICODE characters in length.
Removes the entire ignore query band setting from the profile.

Example: Modifying a Profile to Set a Default Query Band Value and a Query Band Value to Ignore

In this example, the user's profile query band is set to TVSTemperature=WARM. If the user sets the query band to TVSTemperature=HOT, the name-value pair is discarded from the query band.
    MODIFY PROFILE salesprofile AS,
          QUERY_BAND = ’TVSTemperature=WARM;’ DEFAULT,
          IGNORE QUERY_BAND VALUES =’TVSTemperature=HOT’;

Usage Notes

If a profile has a query band that is defined as NOT DEFAULT, it is redundant to define the IGNORE QUERY_BAND VALUES with name-value pairs having the same names as defined in the profile query band. The NOT DEFAULT profile query band causes the SET QUERY_BAND statement to discard any name-value pair matching the names in the profile query band.

Changes to the profile IGNORE QUERY_BAND VALUES of currently logged on users do not affect existing query bands in the session. Subsequent SET QUERY_BAND statements in the session are validated according to the updated profile IGNORE QUERY_BAND VALUES.