-- Update transactions with different transaction and payment currency, with foreigncurrency, foreignconvertrate and foreignamount not setted update fin_finacc_transaction t set foreign_currency_id = p.c_currency_id, foreign_convert_rate = p.finacc_txn_convert_rate, foreign_amount = p.amount from fin_payment p where t.fin_payment_id = p.fin_payment_id and t.c_currency_id <> p.c_currency_id and t.foreign_currency_id is null and t.foreign_convert_rate is null and t.foreign_amount is null