Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> UPDATE catch-22 - help!

UPDATE catch-22 - help!

From: Joost Ouwerkerk <joost.ouwerkerk_at_sickkids.on.ca>
Date: Thu, 03 Dec 1998 17:51:54 GMT
Message-ID: <3666cfa2.8877569@resunix.sickkids.on.ca>


Two tables:

PAYMENT (transactionID, PersonID, amount, paymentdate) CREDIT (creditID, transactionID, PersonID, CreditPersonID)

The credit table logs people who get credit for payments made by other people. A credit record can only be created for existing Payments and this is enforced by a constraint.

The two tables are linked by a primary key that consists of the transactionID and the PersonID

If I try to update the PersonID on the PAYMENT table, I get a 'child record found) constraint violation.

If I try to update the PersonID first on the PAYMENT table, I get a 'parent key not found' constraint violation because a PAYMENT record with that combination of transactionID+PersonID does not yet exist.

How do I UPDATE the PersonID?

Joost Ouwerkerk
Toronto, Canada Received on Thu Dec 03 1998 - 11:51:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US