CALL Syntax | SQL Statements | VantageCloud Lake - CALL Syntax - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
CALL [ database_name. | user_name. ] procedure_name
  ( { IN_argument | INOUT_argument | OUT_argument } [,...] ) [;]
IN_argument
INOUT_argument
{ value_expression | ? }
OUT_argument
{ out_call_variable | out_call_placeholder }
out_call_placeholder
{ parameter_name | CAST (OUT out_call_placeholder AS data_type) }

Syntax Elements

database_name
user_name
Optional qualifier for the SQL procedure or external procedure to run.
If database_name is not specified, the current default database is assumed.
procedure_name
Name of the SQL procedure or external procedure to run.
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
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 Data Types and Literals.