Can I use "else if" in a trigger ?
626351Apr 9 2009 — edited Apr 10 2009My trigger works when I take out the "else if" part. Is there a way I can use something like the "else if" without getting compilation errors ? Either "nsn" or "load_date" is updated in the table ~ never both columns updated at the same time...
create or replace trigger upd_cib01_resolv_join_trg
after update on gateway.rpf_cib_resolved_join
for each row
when (old.scale_code = 'I4')
begin
if (:old.nsn != :new.nsn) then
update rpf_cib01_resolved_join
set nsn = :new.nsn
where cd_name = :old.cd_name and
zone_cell = :old.zone_cell and
frame_name = :old.frame_name;
else if (:old.load_date != :new.load_date) then
update rpf_cib01_resolved_join
set load_date = :new.load_date
where cd_name = :old.cd_name and
zone_cell = :old.zone_cell and
frame_name = :old.frame_name;
end if;
end;
thanks,
Vicki