I have few IF STATEMENTS in my script and want to remove them due to performance issue can you help me on this.
Below is sample one,
IF(GROUP_NAME='ABC',LOCAL_AMOUNT,0) as ACCOUNT_1
IF(match(GROUP_NAME,'CASH','INV','PAID EXP'),LOCAL_AMOUNT,0) AS CURRENT_AMOUNT
In above two IF STATEMENTS, GROUP_NAME is coming from Table1 and LOCAL_AMOUNT is coming from Table2.
so, I joined the two tables (Table1 and Table2) to write if statement.
Can you in improving the performance by replacing the IF STATEMENTS with any other.
You can use Apply Map() Function.. or You can use crosstable() function to join 2 tables...
You can take help from above 2 links.