update vs4tpostranssub set tptscost=(select tpdtstandardcost from vs4tproduct
where tpdtcode=tptstposcode)
update vs4tpostranssub set tptscost=0 where tptscost is null
update vs4tpostranssub set tptscostamount=tptscost*tptsquantity
update vs4tpostrans set tptacosttotal=(select sum(tptscostamount) from vs4tpostranssub
where tptstptano=tptano)