Updating table from excel (1 Viewer)

reglarh

Registered User.
Local time
Today, 04:46
Joined
Feb 10, 2014
Messages
118
I have an excel spreadsheet from a bank, from which I can extract membership renewal payments.

My task is to update the membership table with dates and amounts paid.

What would be the best approach to this task?
 

Ranman256

Well-known member
Local time
Today, 07:46
Joined
Apr 9, 2015
Messages
4,337
Save the excel file as a generic name,like file2import.xls.
Link the file as a table.
Make 2 queries,
1 query to add new records that don't exist.
1 query to update existing items (if needed).
Put the queries in a macro.

So the workflow would be:
1.Get new XL file,save and overwrite file2import.xls.
2. Run macro.
Done.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 21:46
Joined
Jan 20, 2009
Messages
12,852
1 query to add new records that don't exist.
1 query to update existing items (if needed).

The Insert query is not necessary because it can all be done with the Update query.

Outer join from the source table to the destination table on the key fields. Existing records will be updated and new records will be inserted.
 

Users who are viewing this thread

Top Bottom