var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: update table into trigger but on same table trigger based
Here is my pbl ; I have a trigger on a table TAB1. The trigger fires After update in order to be able to execute an update command. This update have to update others records on the same table TAB1.
Is that possible ? and do the trigger fires again for the other updated records and again and again ??
thanks for your answer
Last edited by rd4004; 05-20-09 at 04:23.
Reason: update the title
rd4004, you should be able to do what you want without getting into an endless set of triggers firing.
When you create an UPDATE trigger you can specify OF COLUMN col-name(s).
Trigger1 AFTER UPDATE OF COLUMN col1 (action update col2)
Trigger2 AFTER UPDATE OF COLUMN col2 (action update col3)
Trigger3 AFTER UPDATE OF COLUMN col3 (action update col4)
Update table-name SET col1 = value WHERE ...
This will fire Trigger1 which updates col2
This will fire Trigger2 which updates col3
This will fire Trigger3 which updates col4
And you are done.
PS If Trigger3 updated col1 or col2 then you would have a problem.
you can put when condition on when to fire the trigger, such as columnX <> ??? or columna = ???
Stealth_DBA u r the mann... I'm facing this problem all weekend on...