Cannot insert from the violations table to the target table.

Cause

The user has issued a statement that attempts to insert rows from the violations table into the target table. For example, the user enters the following invalid statement:

INSERT INTO mytable SELECT * FROM mytable_vio;

Also, if the target table has filtering-mode constraints, you receive this error.

Action

To recover from this error, perform the following actions:

  • Do not use filtering constraints.
  • Stop the violations table.
  • Insert rows from the violations table into a temporary table, and then insert rows from the temporary table into the target table.

Copyright© 2019 HCL Technologies Limited