Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cross Join

Hi

I am trying to join 2 tables with no logical link (Accounts and Periods) so that I can use it to produce a Finance Forecasting script.

In SQL a Cross Join would provide me with a table of all of the possible combinations, eg:

Account Period

1000 1

1000 2

1001 1

1001 2

Can anyone point me in the right direction of how you would do this in QlikView please.

3 Replies
Anonymous
Not applicable
Author

Using "join" between the tables in QV constitutes a full outer join and will give you all combinations in a cartesian product if you don't have any matching fields.

Not applicable
Author

I think an inner join would be better, to avoid the non-matches, if there are no common fields; qlikview will simply create a cross join.

cross_join:

load * from accounts;

innner join load * from periods;

Not applicable
Author

Hi Youngan

Steve Cavill provided the answer to this question, as you mentioned that these tables have no logical link between them, qlikview will first try to find any relationship that might exist between any of the fields that these tables contains, all the possible combinations, if there aren't any existing, then it will create a cross join, irrespective of the 'join' you have specified in your script. hope this helps.

Regards.