The documentation for 14 and 15 says that the following should be possible but I cannot get it to work. Any suggestions team?
REPLACE PROCEDURE financial.showObject()
DYNAMIC RESULT SETS 1
DECLARE cus CURSOR with RETURN FOR
EXPLAIN SELECT * FROM dbc.tables;
this should work for EXPLAIN and HELP also but instead I get:
SPL1007:E(L6), Unexpected text 'EXPLAIN' in place of cursor SELECT statement.
The manual is for both Embedded SQL and Stored Procedures and clearly states that you cannot use EXPLAIN/SHOW/HELP in a SP:
Have a look a Glenn McCall's article how to enable it:
Yes but this seems a contradiction from the manual here:
Addmittedly it's a declare cursor...
The previous page:
InvocationNonexecutable preprocessor declaration.
Embedded SQL only.