UPDATE VS4TARInvoiceMB Set TIoMNAmountInRate=round(
(SELECT TIvoExchangeRate FROM VS4TARInvoice WHERE VS4TARInvoice.TIvoNo=VS4TARInvoiceMB.TIoMTIvoNo)*tIoMNetAmount,2)
 WHERE (TIoMNAmountInRate=0 or TIoMNAmountInRate is null)
GO
UPDATE VS4TARInvoiceMB Set TIoMNAmountInRate=0 WHERE TIoMNAmountInRate is null
GO