[英]MySQL update 1st Table using the 2nd Table with computation
嘗試這個:
update receiving r
join purchorder p
on r.RInumber = p.RINo
set r.ReflectedQty = r.ReflectedQty - p.QtyStan - (p.QtyStan / 100)
-- where r.RINumber = 'myvalue'
我的編輯代碼
update receiving r
join purchorder p
on P.RInumber = r.RINo
set p.ReflectedQty = Format(p.ReflectedQty - r.QtyPack - (r.QtyStan / 100),2) where RINumber = 'RI861RMA'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.