Results 1 to 2 of 2
2004-05-25, 19:07 #1
- Join Date
- May 2002
- Thanked 0 Times in 0 Posts
Merge Data from 2 databases to 1 (ACC'97)
OK, I think I've got a really good one for you guys. What I have are two databases, one is an aggregate archive of many, many years of data and the other is the currently manipulated database with the exact same structure but only has at most the last 3 years of business data. What I would like to be able to do is at the end of every fiscal year, take the current database data and merge it to the archive database. I'm not aware of any simple function that would allow me to do this.
Anybody know of a program or function that would allow us to do this?
2004-05-25, 19:49 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Merge Data from 2 databases to 1 (ACC'97)
In the archive database, create links to the relevant tables in the working database.
Create a query based on one of these tables thats select the records that you want to be archived (probably with some kind of date criteria.)
Change the query to an Append query (Query | Append Query) and specify the appropriate table to be appended to.
Save this query, then make a copy and change it to a Delete query (Query | Delete Query); save this one too.
Repeat for the other tables you want to archive.
Now, make a backup of the archive database, so that you can go back if you mess up things.
First, execute the append query. Test the result, and if it is OK, execute the delete query.