UPDATE VS4TAPVoucherPay SET TPVPAmountInRate=TPVPAmount WHERE TPVPExchangeRate=1 AND (TPVPAmountInRate = 0 or TPVPAmountInRate is null)
GO
UPDATE VS4TAPInvoicePay SET TPIPAmountInRate=TPIPAmount WHERE  TPIPExchangeRate=1 AND (TPIPAmountInRate = 0 or TPIPAmountInRate is null)
GO
UPDATE VS4TARVoucherPay SET TRVRAmountInRate=TRVRAmount WHERE TRVRExchangeRate=1 AND (TRVRAmountInRate = 0 or TRVRAmountInRate is null)
GO
UPDATE VS4TARInvoicePay SET TIPyAmountInRate=TIPyAmount WHERE  TIPyExchangeRate=1 AND (TIPyAmountInRate = 0 or TIPyAmountInRate is null)
GO