Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Regarding Concatenation!

What will happen if I concatenate two tables like the way which is given below. What will be result and drawback if I do so. Will I be getting the same result like the way we load seperately. Please summarize!

table1:

SQL Select A,B,C,D,E from table1;

Concatenate table2:

SQL Select A,C,D,E from table2;

Note: FYI Column B is not available in table2 whereas it is available in table1.

6 Replies
hector
Specialist
Specialist

Hi, the result will be a table with A,B,C,D,E fields, but for all the records from the table 2, B will be NULL

rgds

Not applicable
Author

Thanks for your reply. Ok will we get the same result if we create the chart like the way as if the table was loaded seperately?

hector
Specialist
Specialist

Maybe or maybe not, that depends about how your chart is going to be, but the "big" problem i'm seeing is if you don't concatenate the 2 tables will be the huge synthetic key that it's going to appear

For my perspective, concatenate the two tables, and try your chart.

rgds

Not applicable
Author

Yes synthetic key will appear. To avoid the same I have renamed few of those columns and loaded the table seperatley instead of cocatenating both the tables.

table1:

SQL Select A,B,table1_C,table1_D,table1_E from table1;

table2:

SQL Select A,table1_C,table1_D,table1_E from table2;

Let me know will this technique will give the exact result.

Not applicable
Author

Hi

No it will not get the same result. As you have changed the names of the columns you can't put the "under" each other in the same chart anymore.

You will end up with a table that grows on the width with extra columns.

Better doing a concatenation in the script and if you need to distinguish them add a flag (1 as flag for the first table and 2 as flag in the second table), this way you can distinguish them.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The behavior of the data model is different between linked (or JOINed) and concatenated tables. See this post for some explanation.

http://qlikviewnotes.blogspot.com/2009/11/understanding-join-and-concatenate.html

-Rob