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: 
qlikviewwizard
Master II
Master II

Three identical tables

Hi All,I have 3 tables with the same table structure.Which is the best way to combine these 3 tables?

Concatenate/join/ not mentioning either?

Please suggest. Thanks in advance.

Table1:

Select C1,C2,C3 from Table1

Table2:

Select C1,C2,C3 from Table2

Table3:

Select C1,C2,C3 from Table3

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

You can concatenate the 3 tables, since all having the same columns so Concatenate is the best option.  If you want a flag to identify the source of each you can add the flag like below

Data:

Select C1,C2,C3, 'Table1' AS Source from Table1.

Concatenate(Data)

Select C1,C2,C3, 'Table2' AS Source from Table2.

Concatenate(Data)

Select C1,C2,C3, 'Table3' AS Source from Table3.

Hope this helps you.

Regards,

Jagan.

View solution in original post

7 Replies
sunny_talwar

I would think Concatenating them would make sense.

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can concatenate the 3 tables, since all having the same columns so Concatenate is the best option.  If you want a flag to identify the source of each you can add the flag like below

Data:

Select C1,C2,C3, 'Table1' AS Source from Table1.

Concatenate(Data)

Select C1,C2,C3, 'Table2' AS Source from Table2.

Concatenate(Data)

Select C1,C2,C3, 'Table3' AS Source from Table3.

Hope this helps you.

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

What data is there in columns C1, C2 & C3 if anyone is a measure like Sales then Concatenate it without further thinking.

If you join ultimately you will get only 3 columns by reducing the Row Count.

Regards,

Jagan.

qlikviewwizard
Master II
Master II
Author

Thank you both of you.

Not applicable

concatenate is best option ...

jagan
Luminary Alumni
Luminary Alumni

Check below links, hope it helps you.

Merging Data from Multiple Sources

Understanding Join, Keep and Concatenate

Regards,

jagan.

qlikviewwizard
Master II
Master II
Author

Thank you so much Jagan.