PDA

View Full Version : Find and delete in the same table



kbsudhir
05-23-2009, 04:17 AM
Hi All,

I want to create a query to delete the duplicates in a table.
But the duplicate is decided only as per the various criterias are satisfied.

I have following fields in the table.

ReqNo
ItemNo
Code
Cost1
Cost2
Cost3
Cost4
DateStartNow, An entry will be considered as a duplicate only when we have more than one entry where the data in all the above fields matches with each other.

I want to delete all the entries except one.

Please guide.

:banghead: :dunno :help :think:

Regards
Sudhir

shamsam1
05-23-2009, 04:46 AM
this might me helpful

http://www.databasejournal.com/features/msaccess/article.php/3077791/Delete-Duplicate-Records-From-Access-Tables.htm
(http://www.databasejournal.com/features/msaccess/article.php/3077791/Delete-Duplicate-Records-From-Access-Tables.htm)

CreganTur
05-26-2009, 11:43 AM
Now, An entry will be considered as a duplicate only when we have more than one entry where the data in all the above fields matches with each other.


Do you not have one of the listed fields setup as a primary key, or is this a table/database you inherited and are trying to clean up?