Query Problem

Humanski

Registered User.
Local time
Today, 17:45
Joined
Aug 26, 2002
Messages
13
Hello

I have a problems how would I write : -

If Ref_no is equal to Ref_no then delete 1 of the records

REF_NO
12345
REF_NO
12345

This would be a match so I would like to delete one of these records, is there a way to do this with SQL.
 
You can make a query through the wizred to find duplicates and then make a delete query out of the duplicate query. :)
 
If the table has no unique identifier, you will not be able to delete duplicate rows. Access will not be able to determine which specific row should be deleted so it will not delete. The easiest way to get rid of duplicates is to make a new table with the proper keys defined to prevent dups from being created. Then use an append query to get the data from the original table and append it to the new table. Press OK to bypass the error message telling you that some rows will not be appended.
 

Users who are viewing this thread

Back
Top Bottom