Clearing table from duplicates on related table (1 Viewer)

jaryszek

Registered User.
Local time
Yesterday, 21:52
Joined
Aug 25, 2016
Messages
756
Hi,

i have related table - lookup table like in attachment.
I would like to clear all not necessary rows - duplicated rows.

Table has relationships.

How can i achive this?

Please help,
Best,
Jacek
 

Attachments

  • Screenshot_17.jpg
    Screenshot_17.jpg
    60 KB · Views: 46
  • Screenshot_18.png
    Screenshot_18.png
    19.9 KB · Views: 47

CJ_London

Super Moderator
Staff member
Local time
Today, 05:52
Joined
Feb 19, 2013
Messages
16,607
You need to clarify what you mean as a duplicate - I don't see any in your example on the basis of a normal expectation of what a lookup table is
 

jaryszek

Registered User.
Local time
Yesterday, 21:52
Joined
Aug 25, 2016
Messages
756
Hi,

please look at records 25 and 29 - there is the same core number.

So I am assigning different CoresID with the same Cores Number - only 1 is required.
Because i can add to related table Cores ID = 25. I do not have add Core ID = 25 and Core ID = 29.

Best,
Jacek
 

jaryszek

Registered User.
Local time
Yesterday, 21:52
Joined
Aug 25, 2016
Messages
756
And second question, do you create uniqu index when addind values to vlookup table?

Best,
Jacek
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:52
Joined
Feb 19, 2013
Messages
16,607
use a find duplicates query to find the duplicates and delete one or more of them.

Struggling to understand what you are doing since the related link in the other table will be orphaned - so those need to be removed first

with regards your second question - it depends on the purpose but certainly I would expect to see a unique index because you wouldn't want duplicates. Whether you also have a primary key is another question
 

jaryszek

Registered User.
Local time
Yesterday, 21:52
Joined
Aug 25, 2016
Messages
756
Thank you.

Ok i have to remember to set up unique indes to avoid duplicates.

And you have right - i have to remove duplicated in related table first, and secondly do it in my lookup table...

Best,
Jacek
 

Users who are viewing this thread

Top Bottom