Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Concatenating tables

Hi all,

I have 2 tables with same no. of fields and field names.

Table 1 contains the data of 2014 year.

Table 2 contains the data of 2013 year.

Can i use the below code to combine both into single table????

Table3:

Load Field1, Field2, Field3 from

Table1.Qvd;

Concatenate

Load Field1, Field2, Field3 from

Table2.Qvd;

Store Table3 into 2013&2014 Data.qvd

12 Replies
jolivares
Specialist
Specialist

if you have two identical tables, you only have to load one after the other to concatenate in QV without express with the command "concatenate"

Your script is correct, you can even dispense the command "concatenate"

miguelbraga
Partner - Specialist III
Partner - Specialist III

If there is a different key using the same date, there won't be a duplicate values For example, there can be 2 products qith 2 different ID's made in the same day

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Concatenating does not filter duplicates. So yes, if 12/31/2013 exists (overlap) in both source tables then you will have duplicates. If you want to eliminate the duplicates, you have two choices. If every row contains unique values, you can use

LOAD DISTINCT ....

If every row contains a unique key, and that key is the identical on the duplicates, you can use the exists() function.

Load Field1, Field2, Field3 from

Table2.Qvd

WHERE NO EXISTS(Key);

-Rob

http://masterssummit.com

http://qlikviewcookbook.com