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 -> Re: How to synchronize two tables using UPDATE triggers?

Re: How to synchronize two tables using UPDATE triggers?

From: Andrew Protasov <protasov_at_percombank.kiev.ua>
Date: 1998/03/20
Message-ID: <6eu0l8$lfj$1@news.lucky.net>#1/1

Hi,

You may try to use package variable in order to save state of update. Say, default value is 0. Each trigger checks it state. If state is 0 then propagate update to the second table and set it to 1. If state is 1 then don't propagate updates and simply set state to 0.

                                   Andrew Protasov

Yanhua Lu wrote in message <3511DD1A.DF8FA8F6_at_pacbell.net>...
>Hi there,
>
>I ran into the problem of synchronizing two tables, say table A and
>table B using update triggers. What I hope to see is once a row in table
>A is updated, the correspdoning row in table B is updated right away to
>reflect the change, and vice versa. My first thought was to implement an
>AFTER update row trigger on both tables, but I realize afterwards that
>it will end up with recursive loop, i.e. table A trigger fires table B
>trigger which fires table A trigger again... Does anybody happens to
>know any work around with this problem, or you have better way to
>synchronize two tables without using triggers?
>
>Thanks a lot in advance.
>
>-- Lu :)
>
>
>
Received on Fri Mar 20 1998 - 00:00:00 CST

Original text of this message

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