update t7
set t7.FQty1 =t7.Fqty2
--select *
from t_JIT_InStockBillEntry t5 --JIT订料单表体
inner join t_JIT_PlanBillentry t7 --JIT计划单表体
on t7.fid=t5.fid_src
and
t5.FClassID_SRC=200000012
and t7.fentryid=t5.fentryid_src
inner join t_JIT_InStockBill t4 on t4.fid=t5.fid
inner join POInStock t1 --收料通知单
on t1.FDate=t4.FMArriveDate and t1.fsupplyid=t5.FSupplier
inner join POInStockEntry t2 on t1.finterid=t2.finterid and t2.FItemID=t5.FMaterialNo
where t7.fqty1=0 and t5.fqty1<>0 and t5.FQty2=t5.FQty1 and
t1.FCheckDate=CONVERT(DATETIME,CONVERT(NVARCHAR(10),year(getdate())) + '-'
+ CONVERT(NVARCHAR(10),month(getdate())) + '-' + CONVERT(NVARCHAR(10),day(getdate())))
反写更新代理
最新推荐文章于 2023-02-25 23:47:19 发布