-697   OLD OR NEW CORRELATION NAMES ARE NOT ALLOWED IN A TRIGGER DEFINED WITH THE FOR EACH STATEMENT CLAUSE. OLD_TABLE OR NEW_TABLE NAMES ARE NOT ALLOWED IN A TRIGGER WITH THE BEFORE CLAUSE.

Explanation

The trigger, as defined, includes a REFERENCING clause with one of the following invalid combinations:
  • OLD or NEW correlation names specified (or both) and the FOR EACH STATEMENT clause.
  • NEW_TABLE or OLD_TABLE correlation names specified (or both) and the BEFORE clause.

System action

The statement cannot be processed. The trigger was not defined.

Programmer response

Remove invalid correlation names or change the trigger granularity to FOR EACH ROW.

SQLSTATE

42899