如何大规模地对部分数据执行查找和替换? [英] How can I perform Find and Replace to a portion of data on a large scale?

查看:120
本文介绍了如何大规模地对部分数据执行查找和替换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用包含名称和地址的大型数据库。我被要求在Access中创建一个例程,用于标准化地址中的特定单词,如St,Str,St。(Street)和Ave,Ave。 (大道)多做一个查找和替换。我已经尝试创建更新查询,但最终替换了整个字段而不是目标字。我想尝试创建一个可以执行查找和请求的宏,但需要帮助。此例程将定期用于大约500,000条记录。

I am working with a large database that contains names and addresses. I have been asked to create a routine in Access that would be used to standardize specific words in the address such as St, Str, St. (Street) and Ave, Ave. (Avenue) and more by doing a find and replace. I have tried creating an update query, but ended up replacing the whole field instead of the targeted word. I would like to try creating a macro that could do the find and reqplace, but need help with this. This routine would be used on a regular basis on approximately 500,000 records.

推荐答案

更新查询会更快。你可能只是写错了。发布您尝试过的内容,我们可以帮助您解决问题。
An update query would be faster. You probably just wrote it wrong. Post what you tried and we can help you fix it.


我不确定是否可以使用更新查询来完成,因为请求是替换句子中的某些单词(如果我理解的话) )。


查看附带的数据库是否符合您的需求。


PS

即使你会喜欢这个解决方案,不要选择这篇文章作为最佳答案(论坛政策)





I am not sure that can be done using an update query because the request is to replace some words in sentences (if I understand well).

See if the attached database fit your needs.

PS
Even if you will enjoy this solution, do not select this post as the best answer (forum policy)
附加文件
FindReplace.zip (60.1 KB,222 views)
Attached Files
FindReplace.zip (60.1 KB, 222 views)


Rabbit,我输入了* St *在标准和* Street *中为了更新,我最终在整个领域进入了* Street *。


Mihail,感谢您的建议,但我之前没有做过这样的事情。我刚刚开始学习VB。如果我用你给我的代码创建一个db,我假设我可以创建一个宏来运行它。这需要每月运行一次。谢谢
Rabbit, I entered "* St *" in the criteria and "* Street*" for the Update and I ended up with * Street* entered in the entire field.

Mihail, thanks for your suggestion, but I haven''t worked with anything like this before. I am just beginning to learn VB. If I create a db with the code you given me, I assume I can then create a macro to run it. This would need to be run once a month. Thank you


这篇关于如何大规模地对部分数据执行查找和替换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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