CREATE OR REPLACE TRIGGER "XMV502"."ADDC3" before insert on bd_cubasdoc for each row declare -- local variables here i number(1); begin select count(1)into i from bd_cubasdoc where custname=:new.custname or (engname=:new.engname and length(:new.engname)>3) --营业执照或身份照 or (taxpayerid=:new.taxpayerid and length(:new.taxpayerid)>3);--纳税人登记号 if i>0 or regexp_like(:new.custname,'[[:space:]]') then begin raise_application_error(-20001,'客商已存在或有空格,请在已有客商修改增行!'); end; end if; end;
XMV502