Toad World® Forums

"Fire When" checkboxes are unchecked the first time altering a trigger in 12.1.0.22


#1

Problem: I created a trigger on a table using sqlplus. If I try an alter the trigger in toad (version 10.6) there is no issue but if I try an alter the same trigger in toad (version 12.1.0.22) the “Fire When” check boxes are unchecked. If re-check the appropriate “Fire When” checkboxes and save. The next time I alter the trigger they are still checked.
trigger issue.docx (203 KB)


#2

When you first created the trigger in sql*plus, were those keywords in lowercase? If so, that bug was found and fixed recently. It is fixed in the current beta and will be fixed in 12.5, which will be released soon (in the next month or so…I’m not sure of the exact date)

If it was something other that that, please post the original trigger source here (you can chop out the body of the trigger if you want)

Thanks.


#3

Yes, the key words were in lowercase:

Create or replace trigger L2EDFIAPP.SIF_TRG010

before insert or update on L2EDFIAPP.STAFFED_ORGASSIGNMENTASSN

REFERENCING NEW AS New OLD AS Old

for each row

begin

null;

– [05/02/2014] - both_assigns_refid equaled 1 at the time this trigger was created

– ********* L2 and a NON-L2 source will be assigning the REFID *********

if inserting then

:new.source := nvl(:new.source,‘L2’);

end if;

if inserting and :new.refid is null and :new.source = ‘L2’ then

:new.refid := fnc_getuuid;

elsif inserting and :new.refid is not null and :new.source = ‘L2’ then

raise_application_error(-20999,’[21201] - L2 should be assigning REFID.’);

end if;

– make sure the REFID does change

if updating and nvl(:new.refid,’!!!’) <> nvl(:old.refid,’!!!’) then

raise_application_error(-20999,’[21203] - REFID cannot be updated.’);

end if;

end;