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: 
tango
Contributor III
Contributor III

Concatenate 3 tables with Left join

Hi, 

I have 3 tables (B,C,D)which needs to be joined to a another table (A) in such a way that A should be joined to B by Left Join and accordingly C & D with A.

Now what I have tried is ,creating a left join and each section like separate table and simultaneously in next 2 sections for C & D. its creating synthetic key ,I am not sure how should I concatenate them , because Concatenate between 2 tables gives me Full Join which i do not want.

Please help.

Thanks

Labels (1)
15 Replies
BrunPierre
Partner - Master
Partner - Master

Can you post some sample data.

edwin
Master II
Master II

did you drop the 3 tables you joined to table A?  since you left joined all 3 tables to a fourth, you would have duplicated all teh fields fro tables BCD - this could have caused the syth tables.

edwin
Master II
Master II

also concatenate is not a join - 2 different things

tango
Contributor III
Contributor III
Author

Sure..

 

Table:
load * Inline [

X,Y,Z

1,a,a1

2,b,b2

3,c,c3

];

left join(Table)
Table1:
load * Inline [

X,Y,Y

1,a,aa1

2,b,bb2

3,c,cc3

];

left join(Table)
Table2:
load * Inline [
X,Y,D

1,a,aaa

2,b,bbb

3,c,ccc

];

left join(Table)
Table3:
load * Inline [
X,Y,P

1,a,12

2,b,23

3,c,34

];

 

How can I have this in 1 table (Table) above ,because I want to create some calculated fields too.

tango
Contributor III
Contributor III
Author

roopalichavan9274_0-1676723600027.png

 

This is actually my requirement ,so if I am loading Main table thrice it doesnt mean anything , if I load it once and then perform left join and then drop and resident Table , it shows data for 1st loaded table and no data for another

 

tango
Contributor III
Contributor III
Author

Yes I tried with that , when I drop it I do not see any details of it 

BrunPierre
Partner - Master
Partner - Master

Hi @tango 

Base on the diagram, what will the final table look like?

edwin
Master II
Master II

you dont need to join.  Qlik will handle the association.  there must be a reason why you want to join them.  if you want to convert the DM to a star schema then yes, join them and then drop the source tables.  if you arent joining all the fields, you drop the fields you joined into the first table.  but that goes back to the question why do it at all.

left join (MainTable)
load ID, Date, //these are your keys i suppose
Title          //this gets added to main table
resident Table1;
               //at this point Title is in main table
drop Table1; // you dont need this anymore as 
             //youve loaded table1 info into Main
             //do the same to the other tables
tango
Contributor III
Contributor III
Author

Can we have some structure like we can resident Maintable and create a New
Source table wherein I can left joined data from another tables and create
Calculated fields.