Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Table1
id | name |
---|---|
1 | A |
2 | B |
3 | C |
4 | D |
Table 2:
id | value |
---|---|
1 | 10 |
3 | 11 |
Table 3:
name | value |
---|---|
B | 20 |
D | 22 |
how to load three tables into one table?
here is my code
Table1:
LOAD * INLINE [
id, name
1, A
2, B,
3, C
4, D
];
NoConcatenate
Table2:
LOAD * INLINE [
id, value
1, 10
3, 11
];
NoConcatenate
Table3:
LOAD * INLINE [
name, value
B, 20
D, 22
];
map1:
mapping LOAD id,
value
Resident Table2;
map2:
mapping LOAD name,
val
Resident Table3;
Data:
LOAD ids,
name,
alt(ApplyMap('map2',name,Null()),ApplyMap('map1',id,Null())) as value
Resident Table1;
Looks about right, with a couple of comments:
1. The keywords NoConcatenate appear to be out of place, and they are not needed here.
2. At the end of the script, drop your raw tables 1, 2, 3.
3. In the last load statement, you misspelled the field id.
the rest should work just fine.
Cheers,
Oleg Troyansky
Upgrade your Qlik skills with my book QlikView Your Business: An Expert Guide to Business Discovery with QlikView and Qlik Sense
Looks about right, with a couple of comments:
1. The keywords NoConcatenate appear to be out of place, and they are not needed here.
2. At the end of the script, drop your raw tables 1, 2, 3.
3. In the last load statement, you misspelled the field id.
the rest should work just fine.
Cheers,
Oleg Troyansky
Upgrade your Qlik skills with my book QlikView Your Business: An Expert Guide to Business Discovery with QlikView and Qlik Sense