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