How do I keep from importing duplicate data?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having to import a large amount of data that does not have a single
unique identifier - on table at a time. I'm concerned about duplicating an
import and thus the data. Access is assigning an auto number for the key.
Anyone know how or if I can have access verify the data is unique? I could
combine a couple of fields and create a unique identifier but this doesn't
work when I'm importing data.
 
You did not say what import method you are using. To give a complete answer,
this is important. I will assume you are using either TransferSpreadsheet or
TransferText.

Since you can't do any filtering or checking duing this process, it would be
better to create an Access table with the same structure as the data you are
importing. To do the import, first delete all data in the import table:
CurrentDb.Execute("DELETE * FROM ImportTable;"), dbFailOnError
Then do your transfer.

Next, you could create an Append query with criteria that would exclude data
already in the destination table. Here is were you could use the fields
necessary to make the row unique and write your criteria so that rows that
duplicate that combination would not be appended.

Then run the append query.
 

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

Back
Top