Merging two tables

  • Thread starter Thread starter jpowell
  • Start date Start date
J

jpowell

So I am working with some people who are trying to merge multiple
databases and the potential for duplicates is pretty absurd.

I've narrowed it down to two different tables. The first just has
names and addresses (I'll call it tblLimited). The second has the same
fields as tblLimited plus a great deal more (I'll call it tblExtended).

I want to import the records from tblLimited into tblExtended without
creating any duplicates. What is the way to go about this?

Hope that's enough info to go off of!

Joshua Powell
 
First create a unique index on tblExtended using those
fields which will ensure no duplicates. Create an append
query to add the records from tblLimited. Turn off error
message reporting, run query, turn error messages back on.


--
Nick Coe (UK)
Available - Will work for money :-)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store

In
(e-mail address removed) typed:
 
Sorry I should have said something about this before. Some of the
fields can be blank, and some can be duplicates ( They keep a
strFirstName1 / strLastName1 with a strFirstName2 / strLastName2...) I
need it to be so that the combination of all fields aren't duplicated.

??
 
You put all those fields you want into the index. The index
should have the combination of fields in it as you specify.
This trick hinges around attempting to append (insert) rows
and then the append fails on rows which are duplicated
according to whatever indexes you have set up on the table.
Make the index such that it enforces the degree of
uniqueness you require.

--
Nick Coe (UK)
Available - Will work for money :-)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ Online Store

In
(e-mail address removed) typed:
 

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