6 Replies Latest reply: Jul 1, 2014 3:45 AM by Massimo Grossi RSS

    Problem with outer join

      Hi,

       

      excuse for my english,

       

      I have a doubt about the use of OUTER JOIN:

       

      My script is this:

       

      Table_OuterJoin1:

        LOAD * INLINE [

           PK, Product, invent_sum

           1, 'P1', 5

           2, 'P2', 10

           3, 'P3', 15

           4, 'P4', 20

           1, 'P1', 34

        ];

       

        Tabla_OuterJoin2:

        LOAD * INLINE [

           PK, Product, ordered

           1, 'P1', 7

           4, 'P4', 3

           5, 'P5', 5

        ];

       

       

        OUTER JOIN(Tabla_OuterJoin1)

        LOAD * RESIDENT Tabla_OuterJoin2;

       

      The result of this script isn't as I expected:

        PK                       product                                      ordered                  invent_sum


      1P17
      2P210
      3P315
      4P4320
      5P55

      I expected two rows for the PK=1

      1                       P1                                    7                                  5

      1                       P1                                    7                                  34

       

      How do I gain this result?

       

      Thanks in advance