Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
in a Qlikview script I would like to create a table resulting of a cartesian product.
The first table contains Products :
product_id, product_name
1 AAAA
2 BBBB
The second table contains Countries :
country_id, country_name
FR France
ES Spain
Il would like a table as :
product_id, product_name, country_id, country_name
1 AAAA FR France
1 AAAA ES Spain
2 BBBB FR France
2 BBBB ES Spain
I tried using "outer join" but the result is :
product_id, product_name, country_id, country_name
1 AAAA - -
2 BBBB - -
- - FR France
- - ES Spain
Can someone help me to have the expected result ?
Thanks in advance
Hi,
you should use left join or right join
see attached
try this...
load * inline [
product_id, product_name
1,AAAA
2,BBBB
];
join
load * inline [
country_id, country_name
FR,France
ES,Spain
];
Thanks for your answer. It works.
In fact my problem was with the product table load and not with the join.
Thanks for your answer. It works.
In fact my problem was with the product table load and not with the join.