16.20 - SET QUERY_BAND Syntax Rules - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
English (United States)

The following rules apply to the syntax of SET QUERY_BAND statements.

  • Each name:value pair must be separated from other name:value pairs by a SEMICOLON character.

    No other separator is valid.

  • The entire string of name:value pairs for a given SET QUERY_BAND request must be delimited by APOSTROPHE characters.
  • The value component of a name:value pair can contain an = (equals) sign, but the name component cannot.
  • Pair names cannot be repeated within a query band definition.
  • When pad characters are located in the following positions, Teradata Database considers them to be extraneous and removes them from a query band string.
    • At the beginning or end of the query band string
    • Before and after an EQUALS SIGN (=) character
    • Before and after a SEMICOLON (;) character
  • Parameterized requests are supported for the ODBC and JDBC APIs for SET QUERY_BAND … FOR TRANSACTION only.

    Query bands support the QUESTION MARK (?) parameter marker for parameterized requests submitted by the ODBC and JDBC APIs.

    For example, the following SQL procedure definition is not valid because it attempts to pass a query band as the parameterized value :qbin.

         CREATE PROCEDURE setqbmsr(IN qbin VARCHAR(60))
           INSERT INTO abc (1,2);