5 Replies Latest reply: Feb 7, 2017 4:28 AM by Massimo Grossi RSS

    Left join a table twice by specific field

    Louis Lam

      Hi all,

       

      I have a requirement that need to join two tables twice by different field. Below is the scenario

       

      Table A

      Field 1Field 2Field 3
      1F21
      2F32
      3F23
      4F34

       

      Table B

      Field 4Field 5Field 6
      AF21
      BF22F32
      CF23
      DF34

       

      Table A Field 3 left join Table B field 6

      Result of first Join

      Field 1Field 2Field 3Field 4Field 5
      1F21
      2F32BF22
      3F23
      4F34D

       

      Table A Field 2 left join Table B field 5

      Result of second Join

      Field 1Field 2Field 3Field 4Field 5Field 6
      1F21A
      2F32BF22
      3F23C
      4F34D

       

      How can i do the above joining in loading script?

       

      Best Regards,

      Louis