
stored procedure syntax error on sql statement
I get a SYNTAX ERROR in compiling a stored procedure where I have an SQL
statement with a UNION.
Its a query which returns 1 row, so I issue the sql as a single SELECT /
INTO ... statement.
The only way I can get the SPL to compile successfully is if I put the SQL
within a foreach loop.
Is this normal behavior?
I can only assume that the compiler is assuming that the SQL, because it
contains a UNION, is going to return more than one row (at least one for
each set of data) and therefore complains unless a foreach loop is present.
Is anything else going on here? Did I miss this in the documentation?
my environment is Sun Solaris 2.6. IDS 7.30 UC 7
Ben