-487 object-type object-name ATTEMPTED TO EXECUTE AN SQL STATEMENT WHEN THE DEFINITION OF THE FUNCTION OR PROCEDURE DID NOT SPECIFY THIS ACTION
Explanation
A user-defined function or stored procedure object-name was invoked and attempted to execute SQL statements, but the function or procedure was created with the NO SQL option.
In an environment of nested functions and procedures, the SQL option in effect is the most restrictive one that has been specified in the nested hierarchy of functions an procedures. The SQL data access option in effect does not allow for modifying data.
System action
The SQL statement cannot be executed.
Programmer response
Either use an ALTER statement to change the definition of the function or procedure to allow SQL statements, or remove the failing SQL statement from the external function or procedure.
SQLSTATE
38001