Hello Everyone,
I have a problem with duplicate records when joining my tables
Table 1 ( P_ID and G_ID as Primary Key)
Table 2 ( P_ID as Primary Key )
Table 3 ( P_ID and G_ID and F_ID as Primary Key )
I did my table joining as :
Join 1 : Table 1 and Table 2 ON table1.P_ID = table2.P_ID
Join 2 : Result of Join 1 and Table 3 ON ResultJoin1.P_ID = table3.P_ID AND ResultJoin1.G_ID = table3.G_ID
The final table has duplicate records , i know it's normal cause my tables don't have the same columns as Primary Key
Can you guide me to avoid these duplicate records please ?
Thanks
One way to avoid duplicates on this case, you could put an unique tool right before the join's:
If you are referring to that P_ID are shown double, then you can deselect them in the join tool. Otherwise, you can use a unique tool to filter out duplicate values.
Hope it helps.
Hi @Felipe_Ribeir0
Thanks you for replying
I just wanna know the order of tables is important ?
why did you start with table 3 please ?
Cause for me the duplicate is located in tables with more columns as Primary Key , So you have to put the unique tool in front of tables 3 to take unique of the column(s) it has in common with the other table , maybe i get something wrong But why did you put the unique tool in front of the tables that have these columns as Primary Key ?
King regards
Dont worry about the specific order of the print, it was only an example (as i dont know exactly how your data looks like). Just adapt the idea of removing duplicates based on the key columns using the unique tool before of the join for the necessary tables and i think that it gonna work.
Thanks ,
I will do it and i will come back
Kind regards
Hello @Christopher_ZK
If you use In db tools, you must use a summarize in db in order to aggregate your data and avoid duplicate.
Best regards,
Simon