External Stored Procedure Invocation | Teradata Vantage - External Stored Procedure Invocation - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

Invoking an external stored procedure in a CALL statement is no different from invoking a stored procedure.

Argument List

The arguments in the CALL statement must appear as comma-separated expressions in the same order as the list of parameters in the Java method.

The argument types of an external stored procedure in a CALL statement must either be compatible with the corresponding parameter declarations in the function declaration or must be types that are implicitly converted to the corresponding parameter types, according to implicit type conversion rules.

To pass an argument that is not compatible with the corresponding parameter type and is not implicitly converted by Vantage, the CALL statement must explicitly convert the argument to the proper type.

For information on data type conversions, see Teradata Vantageā„¢ - Data Types and Literals, B035-1143.

Invoking External Stored Procedures with TD_ANYTYPE OUT Parameters

When invoking an external stored procedure that is defined with a TD_ANYTYPE OUT parameter, you can specify the RETURNS data type or RETURNS STYLE column expression clauses along with the OUT argument in the CALL statement to indicate the desired return type of the OUT parameter. The column expression can be any valid table or view column reference, and the return data type is determined based on the type of the column.

For detailed information, see External Stored Procedures That Use TD_ANYTYPE Arguments.

Nested Procedure Calls

When doing nested stored procedure calls only one of those procedures can be an external procedure.