Finding 'duplicate' records

R

Rufus DeDufus

I have a database containing a table "Files", with fields "ID" (autonumber),
"size", and "checksum", and others which will not concern us.

I wish to know the IDs of the records that have duplicates. A duplicate is
defined as a record which has the same Size and the same Checksum as at
least one other record in the database (ID is always unique).

Example:

FILES
-------------------------------------------------------------------
ID Size Checksum
1 100 1234
2 200 8899
3 100 1234
4 201 8899

Would return IDs 1, 3 as identical. If there are more than one set of
identical files, it is not required that they be organized into sets, e.g.:

FILES
-------------------------------------------------------------------
ID Size Checksum
1 100 1234
2 200 8899
3 300 3333
4 100 1234
5 299 3333
6 300 3333

.... would return (1 = 4) and (3 = 6) as duplicates, but I can take an answer
of (1, 3, 4, 6).


How do I query for this?
It is easy enough to query for all files (if any) matching record ID 'n'.
That is not requested - I know how to do that.

I am using Access 2000.

Reply to efowler <at> seanet <dot> com.


Thanks very much.

Eric
 
J

John Nurick

Hi Rufus,

Just use the Find Duplicates query wizard. You can get to this from the
New button in the query pane of the database windows, or with the
Insert|Query menu command.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top