Request-pointer and the USING Row Descriptor - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Product
Teradata Tools and Utilities
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-18
dita:mapPath
lvt1544831946862.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

If a USING row descriptor is included in the Teradata SQL request, the USING row descriptor must be the very first clause in the request.

The USING row descriptor names and describes each field of the data pointed to by USING-data-pointer, in positional sequence.

Each field name may be referred to any number of times in any number of statements in that request, including the case of no references to that name. The maximum number of fields may be obtained using the DBCHQE SQL-limits query.

An example of a valid request follows:

USING x1 (INTEGER), x2 (CHAR (2) )
      SELECT * FROM t1 WHERE c1 = :x2;
      SELECT * FROM t2 WHERE c2 = :x2;

The USING row descriptor is also used for macro arguments, as in the following example:

USING x1 (INTEGER) EXEC MACRO (:x1);

For more information about the nature of the USING row descriptor and where it is placed in relation to other information, see Teradata Vantage™ - SQL Fundamentals, B035-1141.