I need to update a column in two tables that are joined by a primary/foreign key. My problem is that when I try to update either table separately, I get either of the following (dependant upon which table I try and update):
ORA-02292: integrity constraint (URMS.EMSR_EMS_FK) violated - child record found
or
ORA-02291: integrity constraint (URMS.EMSR_EMS_FK) violated - parent key not found
Is there a way to update both tables at exactly the same time with the new value? A solution I've found is to copy the existing rows and insert these as new rows, which can then be updated -- the old rows can then be deleted.
Is this the only solution or is there an easier way around this?