Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
Help me please.
I have two tables:
Table1
id | path | pathcode |
1А | group | 1600 |
1B | group | 1500 |
C | all | |
D | group | 800 |
E | group | 500 |
Table2
shops | pathcode |
shop1 | 1600 |
shop2 | 1600 |
shop3 | 1600 |
shop4 | 800 |
shop5 | 800 |
shop6 | 1500 |
shop7 | 1500 |
Final table must looks like this
id | path | pathcode | Магаз |
1А | group | 1600 | shop1 |
1А | group | 1600 | shop2 |
1А | group | 1600 | shop3 |
D | group | 800 | shop4 |
D | group | 800 | shop5 |
C | all | shop1 | |
C | all | shop2 | |
C | all | shop3 | |
C | all | shop4 | |
C | all | shop5 | |
C | all | shop6 | |
C | all | shop7 |
how can i concatenate table1 and table2 for this result?
Thanks!
Well, this is not exactely replicating your output table (why do you don't show id 1b? I also show id E, but this could be removed if necessary):
I😧
LOAD id,
path,
pathcode
FROM
[http://community.qlik.com/thread/53475?tstart=0]
(html, codepage is 1252, embedded labels, table is @1);
Shops:
LOAD shops,
pathcode
FROM
[http://community.qlik.com/thread/53475?tstart=0]
(html, codepage is 1252, embedded labels, table is @2);
RESULT:
LOAD id as ID, path as Path, pathcode as PathCode resident ID where path='group';
join (RESULT) load shops as Shops, pathcode as PathCode resident Shops;
tmpRESULT2:
LOAD id as ID, path as Path Resident ID where path='all';
join (tmpRESULT2) load shops as Shops, pathcode as PathCode Resident Shops;
Concatenate (RESULT) load * Resident tmpRESULT2;
drop tables tmpRESULT2;
Well, this is not exactely replicating your output table (why do you don't show id 1b? I also show id E, but this could be removed if necessary):
I😧
LOAD id,
path,
pathcode
FROM
[http://community.qlik.com/thread/53475?tstart=0]
(html, codepage is 1252, embedded labels, table is @1);
Shops:
LOAD shops,
pathcode
FROM
[http://community.qlik.com/thread/53475?tstart=0]
(html, codepage is 1252, embedded labels, table is @2);
RESULT:
LOAD id as ID, path as Path, pathcode as PathCode resident ID where path='group';
join (RESULT) load shops as Shops, pathcode as PathCode resident Shops;
tmpRESULT2:
LOAD id as ID, path as Path Resident ID where path='all';
join (tmpRESULT2) load shops as Shops, pathcode as PathCode Resident Shops;
Concatenate (RESULT) load * Resident tmpRESULT2;
drop tables tmpRESULT2;
swuehl, thank you very much. Its realy help. TY!