Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

dfreschl
New Contributor II

Left join many to many not working as expected

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

1 Solution

Accepted Solutions
MVP
MVP

Re: Left join many to many not working as expected

It was a bug in QV12 SR 1

Left join broken in QlikView 12 SR1?

4 Replies

Re: Left join many to many not working as expected

You're doing it right.  When I run your code, it gives me the expected output.  I didn't change your code at all.

Capture.PNG

dfreschl
New Contributor II

Re: Left join many to many not working as expected

Strange!  Could it be a version issue?  I'm using v12 SR1.

I'll update to a newer SR and report back.

MVP
MVP

Re: Left join many to many not working as expected

It was a bug in QV12 SR 1

Left join broken in QlikView 12 SR1?

dfreschl
New Contributor II

Re: Left join many to many not working as expected

YEP! Updated to SR5 and it's now working as expected.

Thanks, David

Community Browser