Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
MikeGaunt
Contributor II
Contributor II

Appending two tables

Hi All, 

I need to Append to tables stacking the rows on top of each other. 

The column heading will be different in each Table. 

Table 1 

MikeGaunt_0-1665662207485.png

 

Table 2 

MikeGaunt_1-1665662242334.png

 

I need to add the data from Table 2 to Table 1 according to the following 

MikeGaunt_2-1665662492683.png

 

If this creates a 3rd master table no issue .

I have no idea where to even start. Script thus far for table 1 is attached. 

 

Labels (2)
2 Replies
sidhiq91
Specialist II
Specialist II

@MikeGaunt You can write script something like below:

Noconcatenate

Table1:

Load * from Table1;

concatenate(Table1)

Load * from Table2;

Please let me know if you are looking for something else.

SchalkF
Contributor III
Contributor III

Load * won't work for the below screenshot where he wants the 2 tables to "join":

SchalkF_0-1665670118106.png

 

If you want these fields to align in the same columns in your new table, you need to set the field names of table 2, to the same as table 1 like below:

Combined:
Load *
from Table1

Concatenate(Table1)
Load
          [Purchasing Document] as SO,
          [Item] as [Sales Document Item],

.........

From Table2

Though your data is actually not the same since you are trying to concatenate Purchasing Documents with Sales Documents, but this will give you your desired effect I believe, so just play around with that, if you just wanted everything to be in one table, disregarding that them being in the same fields, then you can use the Load * for both tables and have all the data in one table, with Null values for the Purchasing fields for Sales records, and Null in the Sales fields for Purchasing records

Kind regards