Updating of old row is not allowed in trigger
Include a counter variable in your package to detect this situation.A relational database does not guarantee the order of rows processed by a SQL statement.Also, if global package variables are updated within a trigger, then it is best to initialize those variables in a , because a cursor must be opened for every execution of a trigger.
For example, do not assign a value to a global package variable in a row trigger if the current value of the global variable is dependent on the row being processed by the row trigger.If you have multiple triggers of the same type on the same table, and the order in which they execute is important, use the view is one that lets you perform DML on the underlying table. This approach was both cumbersome to program and subject to memory leak when the triggering statement caused an error and the after-statement trigger did not fire.Some views are inherently updatable, but others are not because they were created with one or more of the constructs listed in Views that Require INSTEAD OF Triggers. A compound trigger has an optional declarative part and a section for each of its timing points (see Example 9-2).A compound trigger defined on a table has one or more of the timing-point sections described in Table 9-1.Timing-point sections must appear in the order shown in Table 9-1.