请大侠帮忙,该改改这个触发器使他有作用,目的是更新修改jyc_person
是,将他更新的tel,handset合并后,将更新到jyc_loandi的handset,如果jyc_loandi的handset字段为空的话。
create or replace trigger aufer_jyc_person_update
       after update on jyc_person
       --referencing old as old_value
       --            new as new_value
       for each row
declare
       handsetchar VARCHAR2(10);
begin
       handsetchar:='';
       if :old.handset<>'' then
          handsetchar:=:new.handset||',';
       end if;
       if :old.tel<>'' then
          handsetchar:=handsetchar||:old.tel||',';
       end if;
       if handsetchar<>'' then
           update jyc_loandi
           set handset=SUBSTR(handsetchar,1,LENGTH(handsetchar)-1) 
           where peid=:old.peid andhandset='';
       end if;
end aufer_jyc_person_update;