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.id,:old.name,: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.

LEFT function in Oracle

There is no documented LEFT() function in Oracle. Find the full set here. Probably what you have is a user-defined function. You can check that easily enough by querying the data dictionary: But there is the question of why the stored procedure works and the query doesn’t. One possible solution is that the stored procedure is …

Read more