select a.wareid
from u_ware_q a(nolock), u_store_i b(nolock), u_store_c c(nolock), c_stall d(nolock), c_org_busi e(nolock)
where a.wareid = b.wareid
and b.wareid = c.wareid and b.batchno = c.batchno and b.idno = c.idno
and c.stallno = d.stallno
and e.busno = c.busno
and ( e.orgtype <> ’10’ and d.stalltype like ‘2%’)
and c.wareqty – c.awaitqty <> 0
and exists (select 1 from u_check_reg, c_org_busi where checkno = ‘2101120000001(盘点单号’ and u_check_reg.busno = c_org_busi.busno and c_org_busi.busno = c.busno ) 检查盘点登记为什么不能开启,哪个商品货位有问题。待检货位检查出的话一般在待出库清单上面找到哪个商品。然后修正库存。
|