CALL Syntax | SQL Statements | Teradata Vantage - 17.05 - CALL Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)
CALL [ database_name. | user_name. ] procedure_name
  ( { IN_argument | INOUT_argument | OUT_argument } [,...] ) [;]

Syntax Elements

database_name
user_name
Optional qualifier for the SQL procedure or external procedure to be executed.
If database_name is not specified, the current default database is assumed.
procedure_name
Name of the SQL procedure or external procedure to be executed.
IN_argument
INOUT_argument
{ value_expression | ? }
OUT_argument
{ out_call_variable | out_call_placeholder }
value_expression
Supported arithmetic and string expressions.
The following can be specified in a value expression, subject to client-specific restrictions:
  • SQL procedure local variables
  • SQL procedure status variables
  • IN or INOUT parameters
  • FOR loop columns and aliases
  • Host variables and macro parameters
  • FORMAT, TITLE, and NAMED phrases
  • Scalar UDFs
  • Scalar subqueries
For client-specific rules, see Rules For Calling Procedures From Embedded SQL.
?
A call parameter argument.
A QUESTION MARK character as an input call argument is valid only in SQL DML, ODBC, and JDBC client applications.
out_call_variable
An identifier prefixed with the COLON (:) character.
Depending on the calling utility, the out_call_variable can be one of these:
  • host variable
  • local variable
  • IN or INOUT parameter
out_call_placeholder
{ parameter_name | CAST (OUT out_call_placeholder AS data_type) }
parameter_name
The name of the OUT parameter as defined in the SQL procedure.
CAST … AS
The request to convert the data definition of a parameter or another CAST clause to the required type. CAST clauses can be nested.
FORMAT, NAMED and TITLE clauses can be used with the CAST operator.
data_type
The data definition for the parameter set.
See Teradata Vantage™ - Data Types and Literals, B035-1143.