Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to avoid infinite loop in Triggers?
>Scenerio:
>Doing an operation in a trigger which the trigger
>was called for in the first place results in the
>infinite loop. For example doing UPDATE in a
>(Before/After) ON UPDATE trigger....
>
>Reason for Doing:
>I want to maintain the audit log. That is, when a
>user deletes a record, its not deleted but marked
>as such. Similary when a record is changed, an older
>copy is maintained with deleted marker. And so on?
>
>The Challange:
>How to accomplish it in triggers with getting caught
>in the cyclic infinite loops?
>
>Thanks for your help!
>
>Regards,
>Nasir (nnoor_at_cris.com)
I would suggest copying the original records to a true audit-log table in the triggers, rather than trying to keep everything in the same table.
Dan Received on Sat Nov 22 1997 - 00:00:00 CST