Case senstive query in Access MDB?

  • Thread starter Thread starter hooway
  • Start date Start date
H

hooway

When I run "select A from B where name='xxx' ", it seems that MDB
ignore the case, return all Xxx, XXX, xxx.

How to make it only return 'xxx', case senstive result?
 
Access/JET is not case sensitive.

For small numbers of records where using an index does not matter, you can
fudge it with the StrComp() operator from VBA, e.g.:
SELECT a FROM b WHERE StrComp(b.a, "xxx", 0) = 0;
 
Access/JET is not case sensitive.

For small numbers of records where using an index does not matter, you can
fudge it with the StrComp() operator from VBA, e.g.:
SELECT a FROM b WHERE StrComp(b.a, "xxx", 0) = 0;

You can actually get partial use out of the (non-case sensitive) index
by using the StrComp as a second filter:

SELECT a FROM b WHERE b.a = "xxx" AND StrComp(b.a, "xxx", 0) = 0;
 
Back
Top