Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger to update different record in the same table

webluca2Oct 6 2017 — edited Oct 6 2017

Hello,

I need help in creating a trigger that update different record of the same table where the trigger resides.

I have a table with:

ITEMLOC
PLANTLEADTIME
I1L1P110
I1L1P220
I2L1P115
I2L1P235

The PK is ITEM, LOC, PLANT.

The trigger should be fired when LEADTIME is updated and should update to the same value all records with the same ITEM/LOC.

So if the first record is updated with LEADTIME=50 I want the trigger to update also the second record with the same leadtime.

I tried with a after each row trigger but I receive a mutating tabel error. I also tried with a after statement but I receive a recursive error.

Do you have an idea?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2017
Added on Oct 6 2017
22 comments
5,485 views