Neoview SQL Reference Manual (R2.5)
CALL Statement
• “Syntax Description of CALL”
• “Considerations for CALL”
• “Examples of CALL”
The CALL statement invokes a stored procedure in Java (SPJ) in a Neoview database. To develop,
deploy, and manage SPJs, see the Neoview Guide to Stored Procedures in Java.
CALL procedure-ref ([argument-list])
procedure-ref is:
[schema-name.]procedure-name
argument-list is:
SQL-expression[{, SQL-expression}...]
Syntax Description of CALL
procedure-ref
specifies an ANSI logical name of the form:
[schema-name.]procedure-name
where each part of the name is a valid SQL identifier with a maximum of 128 characters. For
more information, see “Identifiers” (page 269) and “Database Object Names” (page 242).
If you do not fully qualify the procedure name, Neoview SQL qualifies it according to the
schema of the current session.
argument-list
accepts arguments for IN, INOUT, or OUT parameters. The arguments consist of SQL
expressions, including dynamic parameters, separated by commas:
SQL-expression[{, SQL-expression}...]
Each expression must evaluate to a value of one of these data types:
• Character value
• Date-time value
• Numeric value
Interval value expressions are disallowed in SPJs. For more information, see “Input Parameter
Arguments” (page 57) and “Output Parameter Arguments” (page 57).
Do not specify result sets in the argument list. For information about how to use result sets,
see the Neoview Guide to Stored Procedures in Java.
Considerations for CALL
Usage Restrictions
You can use a CALL statement as a stand-alone SQL statement in applications or command-line
interfaces, such as Neoview Command Interface (NCI). You can also use a CALL statement in a
trigger but not inside a compound statement or with rowsets. If you use a CALL statement in a
trigger, the CALL statement must execute a stored procedure that does not have any OUT or
INOUT parameters or return any result sets.
Required Privileges
To execute a CALL statement, you must have EXECUTE privilege on the procedure. For more
information, see the “GRANT EXECUTE Statement” (page 138).
56 SQL Statements