Execute Statement; Syntax Description Of Execute - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

EXECUTE Statement

"Syntax Description of EXECUTE"

"Considerations for EXECUTE"
"Examples of EXECUTE"
The EXECUTE statement executes an SQL statement previously compiled by a PREPARE
statement.
EXECUTE statement-name
[ USING param [,param]...] ]
param is:
?param-name | literal-value
Syntax Description of EXECUTE
statement-name
is the name of a prepared SQL statement—that is, the statement name used in the PREPARE
statement. statement-name is an SQL identifier. See
USING param [,param]... param is:
specifies values for unnamed parameters (represented by ?) in the prepared statement in the
form of either a parameter name (?param-name) or a literal value (literal-value). The
data type of a parameter value must be compatible with the data type of the associated
parameter in the prepared statement.
Parameter values (param) are substituted for unnamed parameters in the prepared statement
by position—the i-th value in the USING clause is the value for the i-th parameter in the
statement. If there are fewer parameter values in the USING clause than there are unnamed
parameters in the PREPARE statement, Neoview SQL returns an error. If there are more
parameter values in the USING clause than there are unnamed parameters in the PREPARE
statement, Neoview SQL issues warning 15019.
The USING clause does not set parameter values for named parameters (represented by
?param-name) in a prepared statement. To set parameter values for named parameters, use
the SET PARAM command. For more information, see the Neoview Command Interface (NCI)
Guide.
?param-name
The value for a ?param-name must be previously specified with the SET PARAM
command. The param-name is case-sensitive. For information about the SET PARAM
command, see the Neoview Command Interface (NCI) Guide.
literal-value
is a numeric or character literal that specifies the value for the unnamed parameter.
If literal-value is a character literal and the target column type is character, you do
not have to enclose it in single quotation marks. Its data type is determined from the data
type of the column to which the literal is assigned. If the literal-value contains
leading or trailing spaces, commas, or if it matches any parameter names that are already
set, enclose the literal-value in single quotes.
See the
"PREPARE Statement" (page
see the Neoview Command Interface (NCI) Guide.
"Identifiers" (page
?param-name | literal-value
154). For information about the SET PARAM command,
269).
EXECUTE Statement
121

Advertisement

Table of Contents
loading

Table of Contents