merging two .mdb files

M

Masoud

I have two .mdb files with exactly the same structure
(Tables,...) but the second database has a data subset of
the first (base)data.

I need to merge these two DBs into one database. I need
to do it through SQL, ADO via VBA code. My main problem is
writing the SQL statment to do following:

1- chose a record from second database
2- Search the first (Base) database for that record
3- Compare the records
4- If they are different, replace the Base record with the
second DB record

I would appreciate any help.

Regards
Mark Paydar
..
 
J

Jack MacDonald

I would approach it this way:

create a new MDB file
link the tables from both the existing mdb files
create a query that joins the tables
add criteria that select only "different" records
update the fields as appropriate

If this is an on-going occurrence, save the query and run it
periodically. If there are multiple tables involved, create multiple
queries. No VBA required.



I have two .mdb files with exactly the same structure
(Tables,...) but the second database has a data subset of
the first (base)data.

I need to merge these two DBs into one database. I need
to do it through SQL, ADO via VBA code. My main problem is
writing the SQL statment to do following:

1- chose a record from second database
2- Search the first (Base) database for that record
3- Compare the records
4- If they are different, replace the Base record with the
second DB record

I would appreciate any help.

Regards
Mark Paydar
.


**********************
(e-mail address removed)
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
 

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