如何定期从链接的.txt文件更新MS Access表? [英] How to regularly update MS Access table from linked .txt file?

查看:101
本文介绍了如何定期从链接的.txt文件更新MS Access表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我认为我可以解决黑客的工作解决方案,但我希望找出最简单的方法来定期更新MS Access表,以使其与链接的.TXT文件的内容完全匹配.如果链接的.TXT文件中同一行中的值已更改,我希望MS Access更改表中一行中的值,以及添加任何新行并删除.TXT文件中不再存在的任何行.

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.

推荐答案

您可以链接(附加)文本文件.然后运行组合的追加/更新查询:

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

通过一次查询更新和追加记录

新文本文件到达时,只需将链接的文本文件替换为新文件即可.

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

这篇关于如何定期从链接的.txt文件更新MS Access表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆