Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: UPDATE catch-22 - help!
I am a little out of practice, but what happens if your update statement
includes both the transaction id and the person id (the key field), rather
than just the person id? Update the parent first, then the child. As long as
the foreign key ri is not on both tables (just on the child), you might get
away with it.
In article <74725i$irc$1_at_as4100c.javanet.com>,
"George Meltser" <meltser_at_aigfpc.com> wrote:
> I do not think you can use trigger approach, since you are going to get
> a famous "trigger constrainig" error message.
> The reason why it is so difficult is because Oracle still has not
> implemented
> cascade update.
> The only choice you have (IMHO) is to insert new record in PAYMENT
> with new PersonID and other fields the same as for th eold PersonID,
> then copy all exisiting records in CREDIT under old PersonID to new PersonID
> then delete the old PersonID records from PAYMENT and if you have
> delete cascade it will delete all corresponding children. If you do not have
> cascade
> delete defined, then delete children first manually.
>
> Regards,
> George
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sat Dec 05 1998 - 14:15:37 CST