Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created my tables using SQL statements in the Data Load Editor. I know that if the columns of two table are the same name they will be joined, however how do I join three columns of the two table together?
Yes u just Concate the field
select (Column1,Column2) as Composite Key,Data1
from Table1;
select (Column1,Column2) as Composite Key,Data2
from Table2;
after that use join
select a.Composite Key,b.composite key, Data1, Data2
from Table1 a left join Table2 b
where a.Composite=b.Composite;
You will need to create a new field with the concatenation of the values of these three fields in both tables.
Make it Composite Key :
e.g
MainTable:
Load
Column1'-'Column2 as [Composite Key],
Data1
From Table1;
left join(MainTable)
Load
Column1'-'Column2 as [Composite Key],
Data2
From Table2;
I am using the plain SQL no Qlik expressions can I generate composite key on the plain sql?
Yes u just Concate the field
select (Column1,Column2) as Composite Key,Data1
from Table1;
select (Column1,Column2) as Composite Key,Data2
from Table2;
after that use join
select a.Composite Key,b.composite key, Data1, Data2
from Table1 a left join Table2 b
where a.Composite=b.Composite;
where a.Composite Key=b.Composite Key