加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle trigger

发布时间:2020-12-12 14:42:38 所属栏目:百科 来源:网络整理
导读:create or replace trigger tr_x_af_insert before insert ON x FOR EACH ROW BEGIN -- by lxm 实现修改报文功能(电子口岸提交修改报文,先对已经存在的数据打上删除标记,否则会报数据重复的错误) -- EXISTS2('select * from dual where 1=1')=1 IF(exists
create or replace trigger tr_x_af_insert before insert ON x FOR EACH ROW BEGIN -- by lxm 实现修改报文功能(电子口岸提交修改报文,先对已经存在的数据打上删除标记,否则会报数据重复的错误) -- EXISTS2('select * from dual where 1=1')=1 IF(exists2('select * from x x where x.is_delete=0 and x.unique_waybill_no='''|| :new.UNIQUE_WAYBILL_NO || '''')>=1) THEN update xx set x.is_delete=1 where x.is_delete=0 and x.unique_waybill_no = :new.UNIQUE_WAYBILL_NO and x.id != :new.id; END IF; -- by lml 20170712实现 中航信过来的原始舱单ciq_org_code不对的问题 if(:new.source_code ='INFOSKY') then :new.ciq_org_code:='y'; end if; end;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读