Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Vasu2
Contributor II
Contributor II

Combing 3 tables into one single table

Hi All,

We need to combine 15 tables data into one single table.

Example:

Table 1 is having A,B,C Fields

Table2 is having A,D,E

Table 3 is having D,F,G

I want the Table 4 with A,B,D,F Fields

How can we combine these 3 different tables fields into one single table.

please provide me some example script for reference.

Labels (5)
1 Solution

Accepted Solutions
sidhiq91
Specialist II
Specialist II

@Vasu2 Please see the code below to get the desired output. The join could be any join, inner join, left join etc.

NoConcatenate
Temp:
Load * inline [
A,B,C
1,1,1
];

Join
Load * Inline [
A,D,E
1,1,1
];

Join
Load * inline [
D,F,G
1,1,1
];

NoConcatenate
Temp1:
Load A,B,D,F
Resident Temp;

Drop table Temp;

Exit Script;

If this resolves your issue, please like and accept it as a solution.

sidhiq91_0-1676111024504.png

 

View solution in original post

4 Replies
adithyarpai
Employee
Employee

There are multiple ways of doing this depending on how exactly you want these tables to be joined and what is the end result you are expecting. Check out the below post - this will help you decide what option to use and when

https://community.qlik.com/t5/QlikView-App-Dev/Understanding-Join-Keep-and-Concatenate/td-p/328379

Vasu2
Contributor II
Contributor II
Author

Thanks Adithya for Reply,

i want the final result to be stored in some location for the end user use.

hence i want the final output in one table.

sidhiq91
Specialist II
Specialist II

@Vasu2 Please see the code below to get the desired output. The join could be any join, inner join, left join etc.

NoConcatenate
Temp:
Load * inline [
A,B,C
1,1,1
];

Join
Load * Inline [
A,D,E
1,1,1
];

Join
Load * inline [
D,F,G
1,1,1
];

NoConcatenate
Temp1:
Load A,B,D,F
Resident Temp;

Drop table Temp;

Exit Script;

If this resolves your issue, please like and accept it as a solution.

sidhiq91_0-1676111024504.png

 

rakilita
Contributor
Contributor

Try to load it this way

 

[Table 4]:

load

A

B

C

CONCATENATE([Table 4])

load

A

D

 

CONCATENATE([Table 4])

D

F