16.20 - USING request_ modifier - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

One or more variable parameter names. A value is substituted for each parameter name when the request is processed. Also see “USING Request Modifier” in Teradata Vantage™ SQL Data Manipulation Language , B035-1146 . This is an optional phrase.

USING does not work in a macro when the macro is accessed using BTEQ. When running BTEQ, specify USING in the EXECUTE request.

Including USING in a macro might require special programming. See your Teradata Field support engineer or the Teradata Support Center for help.

Example: Macro Support for UDT Parameters using the NEW Constructor Invocation Before Macro Invocation

The following example demonstrates macro support for UDT parameters.

The p2 parameter of the macro is a structured UDT.

The conversion from VARCHAR to the structured UDT is done using the NEW constructor invocation expression, which is performed before the macro is actually invoked.

    CREATE MACRO m1 (p1 INTEGER, p2 structured_type) 
    AS (INSERT t1(:p1, :p2););
    USING (a INTEGER, b VARCHAR(100))
    EXEC m1(:a, NEW structured_type(:b));