In this blog post, let’s learn about the error message “11049 Illegal use of ROW or TABLE keyword in the REFERENCING clause. Use ROW with row triggers and TABLE with statement triggers.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.
Error Message
11049 Illegal use of ROW or TABLE keyword in the REFERENCING clause. Use ROW with row triggers and TABLE with statement triggers.
Reason for the Error
You attempted to create a row trigger with a referencing clause that specifies the optional TABLE keyword, or you attempted to create a statement trigger with a referencing clause that specifies the optional ROW keyword specified.
Solution
Correct the syntax so that a row trigger uses the ROW keyword in its referencing clause and a statement trigger uses the TABLE keyword in its referencing clause. You can remove the optional keyword because it can be implied from the “for each clause”, if specified. If the optional keyword is not specified, the default is “row” trigger for BEFORE triggers and “statement” for AFTER triggers