In this blog post, let’s learn about the error message “11025 Insert, Update or Delete statement within a compound statement is not allowed as a trigger event.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.
Error Message
11025 Insert, Update or Delete statement within a compound statement is not allowed as a trigger event.
Reason for the Error
An INSERT statement in a compound statement has as its target a trigger subject table on which INSERT triggers are defined.
An UPDATE statement in a compound statement has as its target a trigger subject columns on which UPDATE triggers are defined.
A DELETE statement in a compound statement has as its target a trigger subject table on which DELETE triggers are defined.
Solution
Drop all triggers defined on the table and operation that caused the error. For example, if the operation is a DELETE, drop all DELETE triggers defined on the DELETE statement target table. If the triggers cannot be dropped, avoid performing compound statement operations on the subject tables (or columns)