4 Replies Latest reply: Jun 16, 2017 9:37 AM by David Freschl RSS

    Left join many to many not working as expected

    David Freschl

      Hi All,

       

      Trying to join FROM a table where the join key is repeated to another table where the join key is repeated.  I expect to have rows added to the target table for every matching row in the joining table.  However, it seems that if there is only one distinct join key value in the joining table, it only joins once per line in the target table; no rows are added.  Please help if you can!

       

      Might be better explained with an example:

       

        A:

        LOAD * INLINE [

          Name, Value

          John, .5

          John, .2   ];

       

        Left Join(A)

        LOAD * INLINE [

        Name, Value2

        John,10

        John,20  ];

       

      Expected Output:

      Name, Value, Value2

        John, .5, 10

        John, .5, 20

        John, .2, 10

        John, .2, 20

       

      Actual Output:

        John, .5, 10

        John, .2, 20