MS Access 中区分大小写的搜索 [英] Case sensitive searching in MS Access

查看:51
本文介绍了MS Access 中区分大小写的搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个查询,它在数据库中搜索行以查找匹配的字符串.示例行可能是:

I have a query which searches rows in a database for matching strings. An example row may be:

This is a row which contains a String

我当前运行的查询在语法上与

The query that I am currently running is syntactically identical to

SELECT table.column FROM table WHERE table.column LIKE "*String*"

尽管它返回找到文本字符串"的每一行,无论大小写.

although it returns every row where the text "string" is found, regardless of case.

MS Access 2010 是否有任何我应该使用的区分大小写的字符串比较器?

Does MS Access 2010 have any sort of case sensitive string comparator that I should be using instead of this?

推荐答案

恐怕您将不得不求助于 VBA 方法.幸运的是,VBA 方法可以在 JET SQL 中使用(尽管性能可能不是最好的).VBA Instr 方法允许您指定比较模式(0 = 二进制 = 区分大小写):

You will have to resort to VBA methods, I'm afraid. Fortunately, VBA methods can be used in JET SQLs (although performance might not be the best). The VBA Instr method allows you to specify the comparison mode (0 = binary = case-sensitive):

SELECT table.column FROM table WHERE INSTR(table.column, "String", 0) > 0

这篇关于MS Access 中区分大小写的搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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