-530 THE INSERT OR UPDATE VALUE OF FOREIGN KEY constraint-name IS INVALID

Explanation

An insert or update operation attempted to place a value in a foreign key of the object table; however, this value was not equal to some value of the parent key of the parent table.

When a row is inserted into a dependent table, the insert value of a foreign key must be equal to the value of the parent key of some row of the parent table in the associated relationship.

When the value of the foreign key is updated, the update value of a foreign key must be equal to the value of the parent key of some row of the parent table of the associated relationship.

Start of changeThe following additional rules apply for a temporal referential constraint:
  • When a row is inserted into a dependent table, the BUSINESS_TIME value in the child table must be contained in a BUSINESS_TIME period in the parent table that is represented by the union of BUSINESS_TIME periods of one or more contiguous matching rows in the parent table.
  • When the value of the foreign key is updated, the update value of the foreign key must be contained in a BUSINESS_TIME period in the parent table that is represented by the union of BUSINESS_TIME periods of one or more contiguous matching rows in the parent table.
End of change

System action

The UPDATE, MERGE, or INSERT statement cannot be executed. The object table is unchanged.

Programmer response

Examine the insert or update value of the foreign key first, and then compare it with each of the parent key values of the parent table to determine the cause of the problem.

SQLSTATE

23503