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:
ITEM | LOC
| PLANT | LEADTIME |
---|
I1 | L1 | P1 | 10 |
I1 | L1 | P2 | 20 |
I2 | L1 | P1 | 15 |
I2 | L1 | P2 | 35 |
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?