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.