更新一列数据
update CustomerPromoteDetail set QuantityTotal=QuantityTotal-temp.Quantity
from (select idPromote,Quantity from SODetailPre where bCX = 1 and id =16658) as temp
where AutoID = temp.idPromote
update CustomerPromoteDetail set QuantityTotal=(QuantityTotal-
(select Quantity from SODetailPre where bCX = 1 and id =16658 and CustomerPromoteDetail.AutoID = SODetailPre.idPromote))