Merging similar tables

G

Guest

This question has been posted before but I can’t find it.

The onus is on me to merge two training dbases with tables in each that hold
similar information (class name and class date). I can find where the
records are the same, but not where records are not in the other table.
e.g., class abc on 01/05/2004 is listed in both tables, but class abc on
01/10/2004 is not.

I want to build a query that lists all dissimilar classes in each table.
i.e., the class that are in table1 which are not in table2, AND classes in
table2 that are not in table1.

Eventually, I will be merging dissimilar class information from table2 into
table1.

Does anyone have experience with this sort of merge? What's the best way to
go about it?

tia,
 
G

Guest

Back up the database and build an index of the unique fields - Class,
DateTaught, etc and set the index to unique (no duplicates). Append from the
other table.
 
G

Guest

Thanks for the post. I am unable to index these fields; the error message
says that it would create duplicate values in the index, primary key, or
relationship.

If it makes a difference, I should add that table1 is indexed with an "ID",
auto-generated number. There are also multiple/duplicate class names. e.g.,
class "abc" is listed several times, each with different dates. Not the best
normalization, but that's what I inherited.

I thought I could append all the records from table2 and then run a
duplicate record query and go through and delete all duplicates. Not very
elegant, but it would work.

Any ideas here?
 
G

Guest

I meant for you to build a multi-field index of Class, DateTaught, etc and
set the index to unique (no duplicates). You should not get an error.
 
G

Guest

This is exactly what I need. I learned something today... now I can go home.

thanks for the help!
 

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

Top