Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to link all fields from different tables

For example I have two tables

Table1:

Load id, name, group1, group2 from file1.csv

Table2:

Load id, name, group1, group3 from file2.csv

Automatically QV do SynLink by id, name and group1. When I select in List box of group2 anything, then any choice of "List box" group3 is not active. Also joining that tables don't solve this problem. Is it possible to do it active?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Sergei,

Based in your example, your code must be the following:


FinalTable:
// Table3
Load Id, Name, Group1, 2010 as Year from File3.scv;
Left join
// Table2
Load Id, Name, Group2, 2010 as Year from File2.scv


The join will be done through Id, Name and Year fields, but the field Group2 will be null where the join isn't possible. If you want a exactly join, use the Inner sentence.

I hope this helps you.

Best regards.

View solution in original post

4 Replies
Not applicable
Author

Hi Sergei,

You can try the following:

Table1:

Load id, name, group1, group2, 'none' as group3 from file1.csv;

Table 2:

Load id, name, group1, 'none' as group2, group3 from file2.csv;

This will concatenate both tables.

I hope this help you.

Best regards.

Not applicable
Author

Hi Miguel! Thank you for Your quick reply.

I thnik my example was not very correct, so I try to do another one:

Table1:

Load id, name, group1, group2, 2009 as year from file1.csv

Table2:

Load id, name, group2, 2010 as year from file2.csv

Table3:

Load id, name, group1, 2010 as year from file3.scv

Here I want to link group1 from Table3 with group2 from Table2, when id is the same. But 'none' value is not suitable, because I have real values of group1 in Table3.

Not applicable
Author

Hi Sergei,

Based in your example, your code must be the following:


FinalTable:
// Table3
Load Id, Name, Group1, 2010 as Year from File3.scv;
Left join
// Table2
Load Id, Name, Group2, 2010 as Year from File2.scv


The join will be done through Id, Name and Year fields, but the field Group2 will be null where the join isn't possible. If you want a exactly join, use the Inner sentence.

I hope this helps you.

Best regards.

Not applicable
Author

Thank you very much, Miguel! It realy works now.