1 Reply Latest reply: Sep 19, 2018 1:18 AM by Jyothish KC RSS

    Lookup

    vivek pv

      Hi All,

      i have data where i have to compare nd replace with different tables

      table1:

      Agent_namebranch_code
      A1735
      A2745
      A3610

      Table2:

      This is like master table

      NameBranch
      A1735
      A2745
      A3610
      A4312
      A5567BC

       

      Table 3:

      this is reference table

      Agentrefer-branch
      A1777
      A3589

       

       

      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.

        • Re: Lookup
          Jyothish KC

          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