Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
i have data where i have to compare nd replace with different tables
table1:
Agent_name | branch_code |
---|---|
A1 | 735 |
A2 | 745 |
A3 | 610 |
Table2:
This is like master table
Name | Branch |
---|---|
A1 | 735 |
A2 | 745 |
A3 | 610 |
A4 | 312 |
A5 | 567BC |
Table 3:
this is reference table
Agent | refer-branch |
---|---|
A1 | 777 |
A3 | 589 |
At first stage it should compare data in table_1 with data in tabke_2 and replace the branch in table 1 with table 2 branch. after that, the result should also compare with tabl_3 and replace the branch with referal_branch.
Hi Vivek,
May be like this:
Table1:
Load
Agent_Name,
Applymap('Table3',Agent_Name,branch_code) as branch_code;
Load
Agent_Name,
Applymap('Table2',Agent_Name,'NA') as branch_code
from table 1;
Table2:
Mapping Load
Name,
Branch
from table2;
Table3:
Mapping Load
Agent,
refer-branch
from table3;
Br,
KC