Revivo este antiguo hilo para comentar que me ha pasado lo mismo ahora mismo...
Resulta que no se puede asignar un nuevo valor de la tabla afectada en un trigger AFTER UPDATE.
Cita:
Why don't my triggers fire? For example, I have an AFTER UPDATE trigger that is supposed to update a flag: new.Flag = 'T'; but it never happens!
AFTER triggers cannot be used to set values on the row: the NEW values are read-only at this point.
A BEFORE action trigger fires before the action, followed by constraints, then the action, then AFTER triggers. If a posted operation is cancelled by a ROLLBACK, all of the actions, including the triggered actions, will be undone. The whole package -- BEFORE action triggers, action, and AFTER action triggers and any other changes caused by the changes -- is atomic, which means it will succeed or fail as a unit.
|