任务信息同步失败处理

      在录入质量表信息时,任务信息总是录入失败,经过检查操作步骤,得知录入过程中会同时向两个表中插入记录信息,但更新时只更新了其中一个表,导致两个表中数据不平。暂时没有做程序的调整,可以使用下面语句处理该类数据:

     1.查询任务信息:

 

select wdj.wip_entity_id, we.wip_entity_name
  from wip_discrete_jobs wdj, wip_entities we
 where 1 = 1
   and wdj.wip_entity_id = we.wip_entity_id
   and wdj.organization_id = we.organization_id
   and wdj.organization_id = 103
   and we.wip_entity_name = 'A1321560';

 

    2.查询出不平的数据信息,并进行数据检查:

 

select 'XXXXX',
       t.collection_id,
       t.occurrence,
       t.wip_entity_id,
       t.from_op_seq_num,
       t.character7,
       t.character8
  from bosun_qa_results t
 where t.wip_entity_id = 1420234
--and t.from_op_seq_num=any(81,120)
union all
select 'QA',
       qr.collection_id,
       qr.occurrence,
       qr.wip_entity_id,
       qr.from_op_seq_num,
       qr.character7,
       qr.character8
  from qa_results qr
 where qr.wip_entity_id = 1420234;
--and qr.from_op_seq_num=any(81,120);

 

    3.对XXXXX中的数据进行修改或删除操作,然后在质量模块重新录入数据即可。

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值