USING Request Modifier - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
psg1480972718197.ditamap
dita:ditavalPath
changebar_rev_16_10_exclude_audience_ie.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

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
  • Teradata SQL Assistant for Microsoft Windows User Guide

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.
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 SQL Data Types and Literals 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 to be sent to Teradata Database from the client application when it is elicited, 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.