My trigger is on a table called workorder. When the glaccount field is a new entry I want it to insert a substring of the value into another field. How do I do this? My code keeps receiving an error of
PLS-00049: bad bind variable 'NEW.GLCOMP01'
I have also tried referrencing old as old and new as new, but then I get an invalid trigger.
TRIGGER:
declare
v_gl workorder.glcomp01%type;
begin
v_gl := substr(glaccount, 1, 3);
If :new.glcomp01 is null then
:new.glcomp01 = v_gl;
end if;
end;
PLS-00049: bad bind variable 'NEW.GLCOMP01'
I have also tried referrencing old as old and new as new, but then I get an invalid trigger.
TRIGGER:
declare
v_gl workorder.glcomp01%type;
begin
v_gl := substr(glaccount, 1, 3);
If :new.glcomp01 is null then
:new.glcomp01 = v_gl;
end if;
end;