kgcrowther
Registered User.
- Local time
- Today, 20:34
- Joined
- Jun 1, 2001
- Messages
- 52
I periodically need to update some of the tables in a database with data from a csv file. I wrote a little macro to import the csv file. I cannot just delete the table and then import, because I would have to manually break relationships, import the table, and then manually recreate the relationships. I cannot append the imported table and then delete old entries, because there will be a primary key violation and the changed entries will not be imported. It seems that I should be able to import the data into a temporary table tbl_temp and then run an update query that updates the table my replacing all the old data with the new data, and inserting the additional rows. However, I haven't used MS Access in some time and I'm a little rusty.
Could anyone advise on the best way to update a table with information from another table? (In a sense replace the data in one table with the data from another, but while retaining the structure and relationships.) Thanks for any ideas.
If there is a better way to do the whole thing I would appreciate that too.
Could anyone advise on the best way to update a table with information from another table? (In a sense replace the data in one table with the data from another, but while retaining the structure and relationships.) Thanks for any ideas.
If there is a better way to do the whole thing I would appreciate that too.