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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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.
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,164
Members
448,870
Latest member
max_pedreira

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
Back
Top