-531   PARENT KEY IN A PARENT ROW CANNOT BE UPDATED BECAUSE IT HAS ONE OR MORE DEPENDENT ROWS IN RELATIONSHIP constraint-name

Explanation

For plans and packages bound beginning with Version 5 or dynamic SQL, a multi-row update of a parent key attempted to remove a parent key value on which a foreign key was dependent.

For plans and packages bound prior to Version 5, an UPDATE operation attempted to update a primary key in the specified row of the object table; however, the primary key in the specified row had dependent rows associated with it. The value of a primary key in a parent row cannot be updated if the parent row has any dependent rows.

System action

The UPDATE statement cannot be executed. The object table is unchanged.

Programmer response

Examine the parent key of the object table and the foreign key of the dependent table to determine if the value of the specified row of the parent key should be changed. If this does not expose the problem, examine the contents of the object table and the dependent table to determine the cause of the problem.

SQLSTATE

23504