在查询中搜索字符串? [英] Search for string in query?

查看:74
本文介绍了在查询中搜索字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计们,


我有一个继承的访问应用程序。在我之前至少有六个人在这个上工作过。该应用程序包含数百个查询。


我的(当前)问题涉及一些编码的信息,我们说,这是一种非直观的方式。这种编码多年来一直在变化。我的一位用户今天注意到她跑的报告产生了意想不到的结果。跟踪它,我发现不同的查询以不同的方式处理这个特定的编码,所以我进一步检查并确定哪个处理是正确的,但现在的问题是是否有其他查询使用旧的,错误的标准?


正如我所说,这里有数百个查询。其中一些尚未使用。有些是临时查询。但仍有数百人。如果我只是要搜索VB代码,那就没问题了。但是,我不知道搜索查询内容的可比方法。有一个我可以搜索的特征字符串,但是如何搜索?


有什么想法吗?


谢谢,

Paul

Hi folks,

I have an inherited access application. At least a half-dozen people have worked on this one before me. The application contains hundreds of queries.

My (current) problem involves some information that is encoded in, shall we say, a non-intuitive way. And that encoding has changed over the years. One of my users noticed today that a report she ran produced an unexpected result. Tracking it down, I found that different queries treated this particular encoding differently, so I checked further and determined which treatment was correct, but now the question is are there other queries that use the old, bad criteria?

As I said, there are hundreds of queries here. Some of them are unused. Some were ad-hoc queries. But there are still hundreds. If I just had to search the VB code, that would be no problem. However, I don''t know of a comparable method for searching the contents of queries. There is a characteristic string I could search for, but how to search?

Any thoughts?

Thanks,
Paul

推荐答案

嗨Paul


我的建议是使用内置的Documenter转到工具菜单 - 分析 - 文件管理员。


转到查询选项卡并选择全部。然后转到选项并勾选sql框。确保未勾选其他选项或将其设置为空。运行时,会生成每个查询的所有SQL代码的访问报告。您无法保存此文档,但您可以打印它或将其导出为rtf。


然后您可以搜索文本。


玛丽
Hi Paul

My advice is to use the built in Documenter Go to Tools Menu - Analyse - Documenter.

Go to the queries tab and select all. Then go to options and tick the sql box. Make sure the other options are not ticked or set to nothing. When run this produces an access report of all the SQL code for each query. You cannot save this document but you can print it or export it as a rtf for example.

You can then search the text.

Mary


嗨玛丽,


感谢您的提示。我忘记了记录员了。一次提取近千个查询将是一项重大操作,但我想这可能是搜索所有查询的唯一方法。我想我会让它在一夜之间运行。 :)


谢谢,

Paul
Hi Mary,

Thanks for the tip. I had forgotten about the documenter. It''s going to be a major operation to extract almost a thousand queries at once, but I guess this may be the only way to search them all. I think I''ll let it run overnight. :)

Thanks,
Paul


@prn


有一个vba代码解决方案,但我认为它会非常沉重。本质上,它应该是在查询定义中打开每个查询并在sql中搜索关键字,然后关闭该查询并循环到下一个查询。考虑到查询的数量,我无法想象它会是多么繁重。实际上我甚至试图考虑如何搜索sql,因为它不是我通常会做的事情。
@prn
There is a vba code solution but I think it would be very heavy. Essentially it would be a matter of opening every query in query definition and searching the sql for key words, then closing that query and looping to the next one. I can''t imagine it would be anything but onerous considering the number of queries. Actually I''m even trying to think how to search the sql as it''s not something I would normally do.


这篇关于在查询中搜索字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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