Reputation: 13
create or replace trigger t2
after insert or delete or update
on emp_salary_details
for each row
begin
if inserting then
insert into emp_table_audit
values
( :new.emp_id
, null
, user
, systimestamp
, ‘INSERTION’ );
elsif deleting then
insert into emp_table_audit
values
( null
, :old.emp_id
, user
, systimestamp
, ‘DELETION’ );
elsif updating then
insert into emp_table_audit
values
( :new.emp_id
, :old.emp_id
, user
, systimestamp
, ‘UPDATION’ );
end if;
end;
Upvotes: 0
Views: 43
Reputation: 142710
Problem seems to be in a "fancy" single quote you use in all actions, for example
‘INSERTION’
If you look at what it really is (just first two characters):
select dump('‘I') from dual;
The result shows
Typ=96 Len=4: 226,128,152,73
Once you replace it with a "normal" single quote, everything should be just fine. Actually, seeing how old this question is, I hope you fixed it already, but a little bit of debugging technique can't hurt much.
Upvotes: 3