Update table with data from another table

Bust_Ed

Registered User.
Local time
Today, 02:33
Joined
Feb 24, 2009
Messages
13
Hi,

I've table TblMain with data and another table Tbl2009, which is linked to excel sheet.
I need to update TblMain with data from Tbl2009 with update query. Problem is, that update query doesn't create new rows, only updating existing. Please advise if that can be avoided.

Thank you.
 
An Update query is used to amend existing records.
An Append Query is used to add new records to an existing table.
A MakeTable query is used to create a new table and add data to it.

Hope this helps
 
Ok, how can that be done automatically?

Usually, i need to update table, but time to time there's need of adding new records, that appeared in linked table.

Should i detect number of rows and if that differs use Append query, adding new records?

Or there's a simpler way?
 
Googled to microsoft.com ;-)

In general:

1. Select all unmatched records in second table.
2. Append this records in first table.
3. Update first table with changed records in second table.

That's it.
 

Users who are viewing this thread

Back
Top Bottom