Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
Why compile though..? It should be at precompile.
You cannot do that because it violates the SYNTAX of DECLARE CURSOR.
In the above example you are not trying to declare two cursors. You are just trying to give 3 different names to the same SELECT statement.
The cursor name has to be unique. In embedded SQL there can only one VALID SQL statement between EXEC SQL & delimiter (could be END EXEC,; etc depending on the host language). Hope this helps..!! Thanks