My source table is like below
COL_1 COL_2 COL_3 COL_4
Prakash 1520 SE USD
Kiran 2500 SSE EUZ
ramesh 4500 SE USD
Bhagat 2000 SE EUZ
Madhu 2550 SSE GBP
And My requirement is i need to replace the "COL_4"
where COL_3 = SE AND COL_4 = EUZ THEN COL_4 SHOULD BE REPLACE AS EUR
So here i neeed to be satisfy two conditions then only the output has to be replaced.
Try this once...
Take Expression Transformation.
Define one output port
OUT_COL4 = DECODE(TRUE,COL3='SE' AND COL4='EUZ','EUR',COL4)
Hi Chandra Babu,
Thanks For you Quick response ,
But here i need to do for multiple things like
COL_3 = SE AND COL_4 = EUZ THEN COL_4 SHOULD BE REPLACE AS EUR
COL_3 = SSE AND COL_4 = USZ THEN COL_4 SHOULD BE REPLACE AS USD
Like wise i need to give for multiple your syntax mentioned above is working for one condition only...
Please let me know any one how to achieve in this scenario.....
Okay Lavan, you can write nested decode function as follows...
DECODE(TRUE, COL_3 = 'SE' AND COL_4 = 'EUZ', 'EUR',
COL_3 = 'SSE' AND COL_4 = 'USZ', 'USD',
COL_3 = 'SE' AND COL_4 = 'EUZ', 'EUR', COL4)
Try this .It will work .Let me know if you have any clarifications.