cl*********@abraxas.ch wrote:
Does the term 'host variable' cover a variable locally declared in a
SQL-PL stored procedure? [ I think SQL PL doesn't qualify as a 'host
language' in the sense of embedded sql. ]
I am asking this question in the context of the SELECT INTO statement.
Yes.. There is a general statement in "Identifiers" where SQL Variables
are defined:
"SQL-variable-name
The name of a local variable in an SQL procedure statement.
:=> SQL variable names can be used in other SQL statements where
:=> a host variable name is allowed.
The name can be qualified by the label of the compound statement that
declared the SQL variable."
Important not eon SELECT INTO and VALUES INTO:
These statements are allowed in SQL Procedures (SQL PL) but not in
Triggers and SQL Functions (inline SQL PL). For the later use the
(multicolumn) SET statement.
Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab