盘点异常情况下的紧急处理:
update kwkctab set kcl = (select pdl from view_kw10 where view_kw10.itemno = kwkctab.itemno
and view_kw10.KW = kwkctab.KW
and view_kw10.gys = kwkctab.gys
and view_kw10.pdl is not null
)
where kwkctab.itemno in (select itemno from view_kw10 )
and kwkctab.KW in (select view_kw10.kw from view_kw10 where view_kw10.kw = kwkctab.kw and kwkctab.itemno = view_kw10.itemno)
and kwkctab.gys in (select view_kw10.gys from view_kw10 where view_kw10.kw = kwkctab.kw and kwkctab.itemno = view_kw10.itemno)
select * from view_kw10
select k.itemno,k.kcl,k.kw,k.gys ,v.itemno,v.pdl,v.KW,v.gys from kwkctab k, view_kw10 v
where k.itemno = v.itemno and k.KW = v.KW and k.gys = v.gys
时间: 2024-11-05 22:17:04