An SQL statement that is not allowed in an SPL routine was executed. This error occurs when a routine is called from an SQL data manipulation statement.
Example of error:
CREATE PROCEDURE testproc (arg INT, id INT) RETURNING INT; UPDATE tab SET col = arg WHERE key = id; -- error RETURN id; END PROCEDURE;
SELECT col FROM tab WHERE testproc(tab.col, tab.key) = 10;
Do not use statements such as the preceding UPDATE statement in SPL routines.