USING Request Modifier - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

Defines one or more variable parameter names used to import data to Teradata Database from a client system or to export data from Teradata Database to a client system. Also specifies how imported or exported LOB data is to be handled.

See also:
  • Basic Teradata® Query Reference, B035-2414
  • Teradata® SQL Assistant for Microsoft Windows User Guide, B035-2430

Required Privileges

None.

Syntax



Syntax Elements

using_variable_name
Name of a USING variable that is to be referenced as a parameter in the SQL request associated with the modifier.
Each name specified must be unique.
During processing, each using_variable_name in the SQL request is replaced by a constant value read from the client application.
You can also use dot notation to access DATASET and JSON data. See "Accessing DATASET Data Using Dot Notation" in Teradata Vantage™ DATASET Data Type, B035-1198 and "JSON Entity Reference (Dot Notation Syntax)" in Teradata Vantage™ JSON Data Type, B035-1150.
data_type
Data type of the constant value substituted for using_variable_name.
UDT types are not supported directly. See USING Support for UDTs for details and information about conversion workarounds.
This can be used to set a default value.
See Teradata Vantage™ Data Types and Literals, B035-1143 for a list of data types.
data_type_attribute
One of the data type attributes listed below.
The only data type attributes that affect the handling of values imported by USING are the following:
  • CASESPECIFIC
  • NOT CASESPECIFIC
  • UPPERCASE
The server character set attribute (for example CHARACTER SET LATIN) cannot be part of data_type_attribute.
Type attributes are Teradata extensions to the ANSI SQL:2011 standard.
AS DEFERRED
LOB data is sent to Teradata Database from the client application when requested, and separately from other row data.
This option is only valid for LOB data.
See USING Support for Large Objects for more information.
BY NAME
Interpret the data in the USING row as a client file name. When the system detects the BY NAME option following AS DEFERRED, the following events occur in the order indicated:
Teradata Database sends the file name back to the client.
The client opens the file.
The client sends the data in the file to Teradata Database.
AS LOCATOR
The client application passes a locator for the LOB, generated from a previous SELECT request for the session, to Teradata Database.
This option is only valid for LOB data.
See USING Support for Large Objects for more information.
SQL_request
The SQL request with which the USING request modifier is associated.
This can be a multistatement request, any non-DDL single-statement request, or an explicit transaction.
You can pass the value for n in a TOP n operator in an SQL request by specifying a USING-defined parameter. See Example: USING Request Modifier with TOP Operator.
All USING variable names in the SQL request must be preceded by a COLON character.

ANSI Compliance

USING is a Teradata extension to the ANSI SQL:2011 standard.