PLS-00049 bad bind variable While using :OLD

You can save it in a local variable (like: v_deletedate) and then use that variable in your insert command. create or replace trigger dis_sal_his after delete or insert or update on employee for each row declare username varchar2(10); v_deletedate date; begin select user into username from dual; v_deletedate := :old.deletedate; insert into employeehistory values(,,:old.age,:old.address,:old.salary,v_deletedate); end;

ora-06553 pls-306 wrong number or types of arguments in call to ‘ogc_x’

you’ve used double quotes on “X”. this should be ‘X’. the X object is an function in the MDSYS schema, “ogc_x”, so when you say est.tipo_estatus = “X” instead of the correct est.tipo_estatus = ‘X’ it gets translated (as “” is as an identifier so “X” is the same as just typing X) to est.tipo_estatus = mdsys.ogc_x and of course fails.