Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I guess my problem is simply if you know how to do it... I'm trying to multiply two tables in a load script e.g. if in one table I have orders and in another table I have statuses I expect to receive for an order depending on the order type.
Example:
table order:
OrderID OrderType
1 A
2 B
table status_expected:
OrderType Status
A 100
A 200
A 300
B 800
B 900
expected output:
OrderId OrderType Status
1 | A | 100 |
1 | A | 200 |
1 | A | 300 |
2 | B | 800 |
2 | B | 900 |
Thanks for your help,
Jens
If you just want 1 table use this script (with a join)
[table order]:
load * inline [
OrderID OrderType
1 A
2 B
] (delimiter is spaces);
left join ([table order])
//[table status_expected]:
load * inline [
OrderType Status
A 100
A 200
A 300
B 800
B 900
] (delimiter is spaces);
You can probably get the same result without joining the 2 tables (ie no changes to your script): Qlikview will associate the 2 tables.
If you just want 1 table use this script (with a join)
[table order]:
load * inline [
OrderID OrderType
1 A
2 B
] (delimiter is spaces);
left join ([table order])
//[table status_expected]:
load * inline [
OrderType Status
A 100
A 200
A 300
B 800
B 900
] (delimiter is spaces);
You can probably get the same result without joining the 2 tables (ie no changes to your script): Qlikview will associate the 2 tables.
Thanks, maxgro.
Your first proposal does exactly what I need.