# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
New Contributor

## Join Problem

Hello all

I have this tables

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

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
New Contributor III

## Re: Join Problem

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

6 Replies
New Contributor III

## Re: Join Problem

You need use "where Not Exists"

New Contributor III

## Re: Join Problem

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

Valued Contributor II

## Re: Join Problem

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.

New Contributor

## Re: Join Problem

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

New Contributor III

## Re: Join Problem

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

New Contributor

## Re: Join Problem

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