Update and Append data from temp table to permenant table

smiley1978

Board Regular
Joined
Sep 13, 2005
Messages
133
I have a temp table that I transfer an Excel spreadsheet into. I need to update an existing table in my database with the data in the temp table. I also need to Append any new records. I have an update query that updates the exisiting records, but it will not append any new ones, and I do not want to append all records as that will create duplicates and violate the Primary Key. Can this be done within one query or do I have to set up an Update Qry and then an Append Qry? If I have to do both, what is the best way to find all records on the temp table that have no matching records on the permenant table. Those are the only ones I want to append.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

MyBoo

Board Regular
Joined
Aug 9, 2006
Messages
217
Run an Unmatched query between the two tables to find those you would append.... Quert/New/Unmatched.. you'll need to identify the key fields.
 

Forum statistics

Threads
1,136,649
Messages
5,676,990
Members
419,667
Latest member
MegEri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top