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.
Printable View
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.
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..! )
Thanks, Ecniv!