Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger on a mutating table

robert_177
Occasional Contributor

Trigger on a mutating table

 
what is passat
1 REPLY
Yogeeraj_1
Honored Contributor

Re: Trigger on a mutating table

hi,

If you look weel at the error reported by the PLSQL engine, in this part of the code:

IF INSERTING THEN /* Use 'I' for an INSERT, 'D' for DELETE, and 'U' for UPDATE. */
cAuditType := 'I';
cRow_ID = v_Row_ID;
cLast_Upd_By = v_Last_Upd_By;
ELSIF UPDATING THEN
cAuditType := 'U';
cRow_ID = v_Row_ID;
cLast_Upd_By = v_Last_Upd_By;
ELSE
cAuditType := 'D';
cRow_ID = vo_Row_ID;
cLast_Upd_By = vo_Last_Upd_By;
END IF;


You missed the ":" when doing the assignment! :)

should be:
...
cRow_ID := v_Row_ID;
cLast_Upd_By := v_Last_Upd_By;
...

and
...
cRow_ID := vo_Row_ID;
cLast_Upd_By := vo_Last_Upd_By;
...


Cheers
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)