cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MariosChr90 Member
Member

Left joins generate duplicate values issue

Hello,

 

I am trying to join two tables with a left join UNITS (left table) and TENANT(right table) tables. After the join I am extending the values I want to add in my table and they extend with no problem. The problem is that for some reason new rows are being added in my table and I receive an error message for duplicate ID (primary key) values as a result of the raws addition. Please see a screenshot of this message below.

index issue.PNG

 

Can you please support with this? 

 

Many thanks,

MariosChr90

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Left joins generate duplicate values issue

The issue is that you are likely extending a column that then generates a duplicate row for 99. So, you can imagine how this might happen. When you join the tables, you are aggregating multiple rows from TENANTS for "99" to a single row. But, when you expand the aggregation, you end up with multiple rows of 99 and hence you are getting an issue with your relationship.


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


2 REPLIES 2
Super User
Super User

Re: Left joins generate duplicate values issue

The issue is that you are likely extending a column that then generates a duplicate row for 99. So, you can imagine how this might happen. When you join the tables, you are aggregating multiple rows from TENANTS for "99" to a single row. But, when you expand the aggregation, you end up with multiple rows of 99 and hence you are getting an issue with your relationship.


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


MariosChr90 Member
Member

Re: Left joins generate duplicate values issue

Yes I see, I have resolved the issue. I just remove manually the one duplicate value of '99'.

 

Many thanks for the support!