Insert Trigger problem after insert action... [message #37104] |
Thu, 17 January 2002 15:19 |
buchie
Messages: 5 Registered: March 2001
|
Junior Member |
|
|
I have a trigger problem.
There are two tirggers(Atrg, Btrg) and two tables(Atab, Btab).
Atab table has Atrg that inserts into Btab after inserting at Atab.
Btab table has Btrg that inserts into Atab after inserting at Btab.
After insert, Atrg triggers Btrg,
and Btrig triggers Atrig.
and Atrig triggers Btrig...repeatedly.
How could I cut this trigger action ?
Please, let me know...!!
|
|
|
Re: Insert Trigger problem after insert action... [message #37108 is a reply to message #37104] |
Fri, 18 January 2002 00:05 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
Hi,
Here is the logic for doing the same:
Atrig
-----
1.query the BTAB to find is the record that u want to insert already exist ?
2. if exist then do nothing else insert the record to BTAB.
Btrig
-----
1.query the ATAB to find is the record that u want to insert already exist ?
2. if exist then do nothing else insert the record to ATAB.
Hope it helps!!!
cheers
pratap
|
|
|
|
Re: Insert Trigger problem after insert action... [message #39882 is a reply to message #37104] |
Wed, 21 August 2002 01:18 |
Vijaya Krishna
Messages: 1 Registered: August 2002
|
Junior Member |
|
|
After insert, Atrg triggers Btrg,
and Btrig triggers Atrig.
and Atrig triggers Btrig...repeatedly.
How could I cut this trigger action ?
Please, let me know...!!
------
Dear Buchie,
If you create the trigger for any action on selected columns except the columns which get updated by vice versa trigger. that would stop the problem
|
|
|