|
-
May 29th, 2006, 10:49 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Removing Duplicates From Recordsets
Hi guys,
Does anyone know of an easy way to compare the contents of two recordsets and remove duplicates? I'm aware of the ways to remove duplicates via SQL but was wondering if there's a recordset-related trick or two that I'm missing.
Thanks.
"'Oh, hello Mr. Crick! What do you think of Jeffrey Archer?' Clip-clip-clip! Oh, come on! Who are you kidding? You wait til I'm mayor, you'll see how tough I am! Christ almighty...."
-
May 30th, 2006, 07:00 AM
#2
Re: Removing Duplicates From Recordsets
Sort the recordset on the key field(s) that are duplicated.
Loop through receordset -
- store the previous record
- if the current/next record is the same the held previous (comparing those key fields) then edit to flag ot just delete (edit and flag preferable incase of an error..! )
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Jun 5th, 2006, 04:55 AM
#3
Thread Starter
Addicted Member
Re: Removing Duplicates From Recordsets
"'Oh, hello Mr. Crick! What do you think of Jeffrey Archer?' Clip-clip-clip! Oh, come on! Who are you kidding? You wait til I'm mayor, you'll see how tough I am! Christ almighty...."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|