How to regularly update MS Access table from linked .txt file?

与世无争的帅哥 提交于 2019-12-24 19:24:06

问题


While I think I may be able to work out a hack job solution solution, I'm hoping to identify the most simple way to regularly update a MS Access table to exactly match the contents of a linked .TXT file. I want MS Access to change values in a row in the table if the values in the same row in the linked .TXT file have changed, as well as add any new rows and delete any rows that are no longer in the .TXT file.

I presently have an append query to add the new rows. Is it possible to do all of the above in one query, or do I have to run both an append and (one or two?) update query/queries? Any/all advice is welcome. Cheers.


回答1:


You can link (attach) the text file. Then run a combined append/update query:

Update and Append Records with One Query

When a new text file arrives, just replace the linked text file with the new file.



来源:https://stackoverflow.com/questions/45227504/how-to-regularly-update-ms-access-table-from-linked-txt-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!