UPDATE potemp po
SET po.lbs_warped = 
COALESCE((
SELECT SUM(py.lbs_warped)
FROM pyalloc py
WHERE py.yarn_order = po.p_o_number
),0),
	po.inventory = COALESCE(po.lbs_shippe,0)-COALESCE(po.lbs_warped,0)-COALESCE(po.lbs_retd,0)-COALESCE(po.waste,0)
WHERE 
 po.p_o_number IN ("10014","10640")