Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 10-15-2018, 03:05 AM   #1
jaryszek
Newly Registered User
 
Join Date: Aug 2016
Posts: 330
Thanks: 109
Thanked 0 Times in 0 Posts
jaryszek is on a distinguished road
Clearing table from duplicates on related table

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
Attached Images
File Type: jpg Screenshot_17.jpg (60.0 KB, 17 views)
File Type: png Screenshot_18.png (19.9 KB, 12 views)

jaryszek is online now   Reply With Quote
Old 10-15-2018, 03:27 AM   #2
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 10,433
Thanks: 40
Thanked 3,367 Times in 3,262 Posts
CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice
Re: Clearing table from duplicates on related table

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
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
Old 10-15-2018, 04:00 AM   #3
jaryszek
Newly Registered User
 
Join Date: Aug 2016
Posts: 330
Thanks: 109
Thanked 0 Times in 0 Posts
jaryszek is on a distinguished road
Re: Clearing table from duplicates on related table

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 is online now   Reply With Quote
Old 10-15-2018, 04:03 AM   #4
jaryszek
Newly Registered User
 
Join Date: Aug 2016
Posts: 330
Thanks: 109
Thanked 0 Times in 0 Posts
jaryszek is on a distinguished road
Re: Clearing table from duplicates on related table

And second question, do you create uniqu index when addind values to vlookup table?

Best,
Jacek
jaryszek is online now   Reply With Quote
Old 10-15-2018, 10:36 AM   #5
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 10,433
Thanks: 40
Thanked 3,367 Times in 3,262 Posts
CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice CJ_London is just really nice
Re: Clearing table from duplicates on related table

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
__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is offline   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
jaryszek (10-15-2018)
Old 10-15-2018, 11:11 PM   #6
jaryszek
Newly Registered User
 
Join Date: Aug 2016
Posts: 330
Thanks: 109
Thanked 0 Times in 0 Posts
jaryszek is on a distinguished road
Re: Clearing table from duplicates on related table

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

jaryszek is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding new record in VBA to main table and secondary related table Moss100 Modules & VBA 1 05-11-2013 07:15 AM
Form to enter details in main table and related sub table giriraj84 Forms 1 05-05-2013 11:39 PM
Combining a Unique Record in one table to several related records in another table. wchelly Queries 8 06-22-2012 05:51 PM
Relationships between table - 3 fields in 1 table related to another same table laiching Forms 2 01-16-2012 06:20 PM
How to make Report pull multiple values from table related to related table Ken_Thompson General 4 04-20-2011 12:34 PM




All times are GMT -8. The time now is 10:54 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World