+ -
当前位置:首页 → 问答吧 → 急!!!那位帮忙为小弟看个触发器的问题

急!!!那位帮忙为小弟看个触发器的问题

时间:2011-12-14

来源:互联网

当修改bd_psndoc表中的一行数据需要同步修改该表中引用该条数据的另一行数据,我通过如下触发器解决报错:
CREATE OR REPLACE TRIGGER tri_update_bd_pandoc 
after update ON bd_psndoc 
for each row
declare
 Pragma Autonomous_Transaction;
BEGIN 
  if :new.isreferenced = 'N' or :new.isreferenced is null then
  begin
  update bd_psndoc set bd_psndoc.regular = :new.regular,bd_psndoc.regulardata =:new.regulardata where bd_psndoc.pk_psnbasdoc =:new.pk_psnbasdoc and bd_psndoc.isreferenced = 'Y'; 
  end;
  end if;
  commit;
END;

ORA-00060: 等待资源时检测到死锁
ORA-06512: 在 "ESSDATA.TRI_UPDATE_BD_PANDOC", line 6
ORA-04088: 触发器 'ESSDATA.TRI_UPDATE_BD_PANDOC' 执行过程中出错

作者: a524772399   发布时间: 2011-12-14

顶帖,赚可用分

作者: askandstudy1   发布时间: 2011-12-14

after update of isreferenced ON bd_psndoc

作者: luo_riser   发布时间: 2011-12-14

热门下载

更多