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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare two tables in different access databases

Status
Not open for further replies.

8ginga8

Programmer
Dec 14, 2004
54
CA
Hi everyone,

I need to compare two tables in different access databases. one being the master and the other being a local table.

the master can have hundreds of records and the local have only a few. I need to compare the local to the master and display the ones that are the same and also display the ones that do not exist for the purpose of updating and adding to the master table.

database 1 = local_groups
database 2 = master_groups
primary key in both tables = gr_local_id


Example:
master_groups
1,2,3,4,5

local_groups
1,2,3,4,5,6

OUTPUT
update master_groups 1,2,3,4,5
insert master_groups 6

hope someone can help

Thanks
 
Hello 8ginga8,

>One way would be to link the DBs and then create a querry. this querry/view can be filtered much like a single table.
Your results of the querry (the difference) would then be what you would insert into target table.

Condition is to have some relationship between the 2 DBs.
MS Access:
To link the DBs go to File-->Get Extenal Data--> link..

> Another approach would be importing it all into one table and then filter for duplicate records:

All the best!




:--------------------------------------:
fugitive.gif

[URL unfurl="true"]http://mostarnet.com[/url]

All around in my home town,
They tryin' to track me down...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top