Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger executes INSERTING when should be UPDATING

604224Oct 19 2007 — edited Oct 23 2007
Hi All,

I've got a trigger on a table that has conditions to handle inserting, updating, and deleting. The trigger seems to be executing the inserting condition when it should be executing the updating. Here is the gist of what the trigger does when executed:

if inserting then
--insert into log table as Insert
elsif updating then
--insert into log table as Update
elsif deleting then
--insert into log table as Delete
end if;

On any of these conditions an insert into a log table is executed specifying whether it was an Insert, Update or Delete. It seems when an update happens the inserting code is executing. I was wondering if anyone else has come across this and knows of why it is happening and what can be done to fix it. The oracle version is 9.2.0.8.0.

Any info would be appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 20 2007
Added on Oct 19 2007
8 comments
910 views