Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DELETING REPETITIVE DATA

Status
Not open for further replies.

scrappe7

Technical User
Jul 30, 2001
82
US
Hello everyone,

I'm a summer intern and have been given a project to finish with office 97. I am having a problem when I import an excel file that has data for at least 3 sequential days. the import occurs everyday though. as a result if one of the data fields has not been removed from the excel file on the next day it again becomes imported to access. what occurs is a transaction does not clear and will remain in excel until it does. this means the same data can be reimported way too many times. I would like to tell access if it sees multiple fields that contain the same purchase date, settle date, size, client etc. it should delete any extra's. i basically need a query that will merge all twin data fields as one unique row of data. is this possible and how? thank you very much.

Ed
 
Are these records being updated? If not, you could set a primary key on the fields in the table and not allow duplicates. Then Access will import the new records if there is already a match.

If they are, I suggest you import into a temp table and then run and an update and then an insert query from the temp table to the main table.

To get rid of the duplicates that you have now, right click on the table, copy it, select copy structure and data, save it in the same MDB as another name. Now, delete the records from your main table, set the primary keys, and then run an INSERT query into the main table from the temp table. It will only copy the distinct records... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top