Removing duplicate records in a database. 
Author Message
 Removing duplicate records in a database.

Hello!

I have a recordset in a database which is populated automatically by a
program I have written.  However, quite often the program produces
duplicate records; could someone provide an example how to
programmatically remove duplicate records?

Here's the situation.

The recordset has three fields, "Term or Word", "Location", and
"Title".  I only want to remove the records which are identical in all
three fields.

Thansk!



Wed, 25 Sep 2002 03:00:00 GMT  
 Removing duplicate records in a database.

Quote:

> I have a recordset in a database which is populated automatically by a
> program I have written.  However, quite often the program produces
> duplicate records; could someone provide an example how to
> programmatically remove duplicate records?

> Here's the situation.

> The recordset has three fields, "Term or Word", "Location", and
> "Title".  I only want to remove the records which are identical in all
> three fields.

Assuming you want to delete all except one copy of each set of duplicates, I expect there's a way to do it in SQL, but it might be a bit convoluted (i.e. it's beyond my brain at this time of night). Just finding them, or deleting all of them, would be pretty simple.

Wouldn't it be easier to validate the records that you're posting, so you chuck out duplicates before they get into the db in the first place. A unique index across your three fields would do the trick?

Roger Morton



Thu, 26 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Removing Duplicate Records in a Database.recordset

2. I am getting duplicate records, I mean everything is duplicate even Access record number

3. Automate removing duplicate records

4. Removing duplicate records in SQL

5. Removing Duplicate Records

6. Removing Duplicate Records VB6/Access2000

7. Searching and removing Duplicate records

8. Removing duplicate records locks up Outlook

9. Want to remove duplicate records in CR 9

10. remove duplicate records from a table

11. remove duplicate records from a table

12. remove duplicate records

 

 
Powered by phpBB® Forum Software