After an update from ASA9 to SA12, there seems to be a problem with several procedures. This occurs only if the user does not have DBA authority. In ASA9 everything worked fine.
SELECT * FROM UDP_ErmittleOffeneSaldenAuslagen('', '');
Brings up the following error:
Could not execute statement. The optimizer was unable to construct a valid access plan SQLCODE=-727, ODBC 3 State="HY000" Line 1, column 1
But if I use the following statement, it works flawlessly:
CALL UDP_ErmittleOffeneSaldenAuslagen('', '');
The problem is, that I need the SELECT statement. The procedure itself looks (for example) like this:
CREATE PROCEDURE "FCAdmin"."UDP_ErmittleOffeneSaldenAuslagen"()
BEGIN
SELECT * FROM Akte
END
It looks like the error comes up if a specific table is used inside the procedure. If I use another table instead of "Akte" in the procedure's select statement, it works. Also executing the statement
SELECT * FROM Akte
itself works.
Any clues?