update vs4tinventorymb set tinmamount=tinmamouquantity*(select timcunitcost from vs4tinventorylot where
tinmtpdtcode=timctpdtcode and tinmlotno=timclotno and tinmlotdate=timclotdate and tinmcustom1=timccustom1
and tinmserialno=timcserialno)
