stored procedure syntax error on sql statement 
Author Message
 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


Wed, 18 Jun 1902 08:00:00 GMT
 [ 1 post ] 

 Relevant Pages 

1. case statement syntax error in stored procedure?

2. Stored procedures in Shape statement gives syntax error

3. need help w/ syntax for stored procedure w/ case statement

4. syntax errors calling one stored procedure from another...

5. Syntax Error : Stored Procedure

6. Please help Syntax error in calling Stored Procedure

7. stored procedure probs - Syntax error or access violation

8. Stored-procedure replication ODBC syntax error

9. Syntax error returned from stored procedure

10. Syntax error in Stored Procedure

11. Stored Procedure Syntax error

12. Executing a sql statement stored as a variable in a stored Procedure

Powered by phpBB® Forum Software