Quick question about Append Query

jonathanchye

Registered User.
Local time
Today, 02:53
Joined
Mar 8, 2011
Messages
448
Hi all,

Just want to confirm what I am thinking is correct.

I've ran an Append Query to select certain fields from the old DB to add it into the preformatted table in the new DB. This preformatted table is based on the table from the old DB but it has slightly different fields.

The Append Query seemed successfull so far. So now my new DB's table data mirrors the old one.

However, the old DB is still live at the moment but is due to be taken down soon so I will need to run a query to constantly update the data in the new DB in the mean time.

Let's say during this time the user adds a few new records in the old DB and modify some information on the older records in the old DB. What query should I run to correctly mirror this on my new DB's table?

As I understand it Append Query will only add new records so it won't go through the old records?

Should I just wait until the last minute, clear all data in my new table and run the Append Query once?

Thanks.
 
Run an Update query with an Outer Join (show all records in old table). This appends new records and updates the existing records.
 
Run an Update query with an Outer Join (show all records in old table). This appends new records and updates the existing records.

Thanks for your reply! I'm sorry but I am pretty new to Queries. Below is my current Append Query code which I've used the Query Design tool in Access 2010 to build.

Code:
INSERT INTO tblNCRMasterServer ( --Bunch of fields--)
FROM [NCRServer Master];

I've selected Update Query in the wizard but I can't see any option to include Outer Joins.
 
It would look something like this with the tables aliased:

UPDATE tblOLD AS A LEFT JOIN tblNew AS B ON A.ID = B.ID
SET B.Contact = A.Contact, B.ContactAdress = A.ContactAdress, B.Zip = A.Zip;

JR
 

Users who are viewing this thread

Back
Top Bottom