select a.sourceid,b.sourceid,--into v_count13
'update salesDtl set sourceid =  '||b."sourceid" || ' where rrid = ' ||b."rrid" ||' and line = '||b."line" ||' and del_flag = 0;'
    from salesContract a 
    left join salesDtl b on a.id=b.rrid
    where ifnull(a.del_flag,0)<>1 --and ifnull(b.del_flag,0)<>1
    and (ifnull(a.sourceid,'')<>'' and ifnull(b.sourceid,'')='')
     and a.id=2033710844872888320

解决销售合同导出后又重新导入后报“当前合同产品明细需要调取采购合同产品明细生成，与主信息一致！”信息问题的sql