MS Access数据库中的区分大小写搜索 [英] Case Sensitive Search in MS Access Database
本文介绍了MS Access数据库中的区分大小写搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个要求,我必须从这样的MS访问数据库中获取记录
假设我有一个名为EMP的表和名称为ID的列
我的查询是
Hi,
I have a requirement, where I have to fetch records from MS access database like this
Suppose i have a table with name EMP and column with name ID
My query is
select * from emp where id='-----'
在我的表中,我有类似的东西
In my table, I have something like this
ID name dob
Test testing 27-06-2013
test xxxxx 30-02-2013
现在我必须分别检索这些记录。
提前致谢
Now I have to retrieve these records separately considering the case.
Thanks in advance
推荐答案
你应该从这里开始
http://www.java2s.com/Code/CSharp/Database-ADO.net/Ac cess.htm [ ^ ]
谢谢
--RA
You should start here
http://www.java2s.com/Code/CSharp/Database-ADO.net/Access.htm[^]
Thanks
--RA
参考大>
如何使SQL区分大小写 [ ^ ]。< br $> b $ b
解决方案
Refer
How to make SQL case sensitive[^].
Solutions
- 使用
COLLATE Latin1_General_CS_AS
Quote:
SELECT col FROM table
WHERE col COLLATE Latin1_General_CS_AS = 'value'
StrComp
函数
Quote:
WHERE StrComp('myText1', 'MYTeXt1', 0) = 0
方法签名中的0 - > vbBinaryCompare,执行二进制比较。
这将是一个区分大小写的比较。
Here 0 in the method signature -> vbBinaryCompare, which performs a binary comparison.
It will be a Case Sensitive comparision.
这篇关于MS Access数据库中的区分大小写搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文