Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Please, I need somebody to explain how QlikView would concatenate Table B with Table A. The two tables are shown in the image below. Do note that the order of the columns are not exactly the same in both tables.
Besides, when we say:
CONCATENATE [Table XX]
LOAD …. ;
What is the order of operation - is it result of LOAD statement CONCATENATE [Table XX] or
[Table XX] CONCATENATE result of LOAD statement ?
What would be the name of the table resulting from the CONCATENATE operation?
Thanks you for your patience.
Blank records are created in Table A.
Like
LOAD
Product
FROM TableA;
concatenate
LOAD
Customer,
Product
From TableB;
o/p:
Customer | Product | Source |
1 | TableA | |
2 | TableA | |
3 | TableA | |
4 | TableA | |
123 | 5 | TableB |
234 | 6 | TableB |
345 | 7 | TableB |
456 | 8 | TableB |
Hi Jonathan,
Qlik concatenates (appends new rows) to the first table based on column names. Hence, they do not have to be in the same order of Table A.
Coming to your second question Result of Load statement of Table B is appended to TableA. (Test it with a where clause in TableB)
The result would be TableA itself.
Thanks for the response. So, what happens when some columns in table B do not have matching names in table A?
If you use CONCATENATE final table will have this new Column with Nulls in TableA for this column and values for tableB. If you do not use CONCATENATE keyword synthetic keys will be formed.
Blank records are created in Table A.
Like
LOAD
Product
FROM TableA;
concatenate
LOAD
Customer,
Product
From TableB;
o/p:
Customer | Product | Source |
1 | TableA | |
2 | TableA | |
3 | TableA | |
4 | TableA | |
123 | 5 | TableB |
234 | 6 | TableB |
345 | 7 | TableB |
456 | 8 | TableB |
Thank you all for these responses. I really appreciate them. The illustration makes it look easy. Nevertheless, I am just a beginner in QlikView. I am not sure whether the answers are correct or not. So, I leave it for those who are well grounded in QlikView to determine whether or not the answers are correct.
Hi Jonathan
The answers are correct. Please mark as answered.
No problem Jonathan. Glad that we could help.
Furthermore, you would be able to find more details about concatenation on Qlik help.
/*****************************************************************/
Please close the thread by marking the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution.
Thank you once again.