Discussion Board for collaboration on QlikView Scripting.
I would like to create the cartesian product by joining two tables. Table1 is read into QV from a database and the other is generated internally within QV. An example of what I would like to do is:
Field1 Field2 Field3
1 A 22
2 B 71
The "join" should result in the following table
1 B -
1 C -
2 A -
2 C -
Any suggestions on how this can be done?
Go to Solution.
Hi, you can use simple JOINs for it. But i think, this just works for small amount of data. For your example:
LOAD Field1FROMTable1;OUTER JOINLOAD Field1 AS Field2FROM Table2;LEFT JOINLOAD Field1, Field2, Field3FROM Table1;
It worked like a charm. The only modification I did was to add a distinct option to the first load statement.
LOAD DISTINCT Field1FROMTable1;OUTER JOINLOAD Field1 AS Field2FROM Table2;LEFT JOIN
LOAD Field1, Field2, Field3FROM Table1;