Print Page | Close Window

RemoveDuplicates.mdb (beginner)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=285
Printed Date: 21 Sep 2020 at 9:19pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: RemoveDuplicates.mdb (beginner)
Posted By: Roger Carlson
Subject: RemoveDuplicates.mdb (beginner)
Date Posted: 27 Jul 2008 at 11:16pm

Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - find out why here .
 

RemoveDuplicates.mdb

Illustrates a method for removing duplicate records from a table.

1) If the table does not have a primary key, add an autonumber field. It is essential that the table have a unique field. For example, copy Chains table, add a field called ChainID and make it an autonumber and the Primary Key.

2) Create a delete query like qdelRemoveDuplicatesFromChains2: DELETE * FROM Chains2 AS E WHERE E.ChainID > (SELECT MIN(X.ChainID) FROM Chains2 X WHERE E.Chain = X.Chain);

3) Run the delete query/

Download
Access 97 (74 KB):
http://www.rogersaccesslibrary.com/forum/uploads/5/RemoveDuplicates97.zip - uploads/5/RemoveDuplicates97.zip
Access 2000 (77 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/RemoveDuplicates2k.zip - uploads/5/RemoveDuplicates2k.zip

-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net