Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
You need use "where Not Exists"
Are you looking at Centro_1 / Cantidad /Valor to drive your result?
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.
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
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
Thanks for your help, I created a PK field with the function AutoNumberHash128