Reputation: 141
Hello and Good Morning.
I have 2 Tables and it looks like this.
Table: receiving
and Table: purchorder
and here is my question.
How can I update the column ReflectedQty
using the column QtyPack
and QtyStan
of purchorder
where column RInumber
=RINo
.
Pls take note that the column QtyStan
of purchorder will / 100
Here is the output I need.
TYSM for future help
Upvotes: 0
Views: 31
Reputation: 12378
Try this:
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'
My Edited Code
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'
Upvotes: 1