Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Join Problem

Hello all

I have this tables

tabla a.PNG

table b.PNG

I need a result table that compares these two tables and results in the following table record

result.PNG

I was trying to do it with joins, but my knowledge is not very broad, so I ask any colleague with more experience and knowledge, help me to solve this problem.

Hope for your help.

Best regards.

1 Solution

Accepted Solutions
cristianozilz
Partner - Contributor III
Partner - Contributor III

Hi,

You'll create a concatenate key for these fields.

Table1:

Load

     *,

     CodMaterial_1 & ' |' & Centro_1 & ' |' & AnoMes   as pk 

From Table1

Table2:

Load

     *,

     CodMaterial & ' |' & Centro & ' |' & AnoMes   as pk 

From Table2

View solution in original post

6 Replies
cristianozilz
Partner - Contributor III
Partner - Contributor III

You need use "where Not Exists"

qliktech_uk
Contributor III
Contributor III

Are you looking at Centro_1 / Cantidad /Valor to drive your result?

eduardo_dimperio
Specialist II
Specialist II

Hi David, Like Cristiano said, you can use the concept of Exists or Not Exists, but this only if the data have not be loaded in the memory yet.

Cause the Exists will check not if result of Table A not exists on Table B, but in all tables already loaded.

Anonymous
Not applicable
Author

Hi Cristiano

Thanks for your help, but I need to compare based on the three fields, CodMaterial, Center, YearMes, in table A these fields are with _1, but they are the same. The exits function does not allow me to compare these three fields, how could this be solved?

Best Regards

cristianozilz
Partner - Contributor III
Partner - Contributor III

Hi,

You'll create a concatenate key for these fields.

Table1:

Load

     *,

     CodMaterial_1 & ' |' & Centro_1 & ' |' & AnoMes   as pk 

From Table1

Table2:

Load

     *,

     CodMaterial & ' |' & Centro & ' |' & AnoMes   as pk 

From Table2

Anonymous
Not applicable
Author

Thanks for your help, I created a PK field with the function AutoNumberHash128