HI guys,
I was trying to update the table from command below but it's not working...
Can you please shed some light to make it work.
Thanks in advance
I was trying to update the table from command below but it's not working...
Can you please shed some light to make it work.
Code:
UPDATE table
SET amount =
CASE
WHEN flag = 'Y' AND limit_amt > credit_amt THEN limit_amt/er.rates
ELSE credit_amt/er.rates END
from table t LEFT OUTER JOIN exchange_rate er on t.cncy = er.cncy
Thanks in advance