Case Sensitive Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I create a query on a field that returns records that do not match a
case critera, in this case all caps. I have a field that has SFP in it but
the data must be in caps and I would like a list of those entered incorrectly
as sfp. I have over 200,000 records and it would take to long otherwise.

Thanks, JLD
 
Assuming you're running the query from within Access, you can use the
StrComp function (although it will make the query quite slow).

StrComp(String1, String2, 0) will return 0 if the two strings are the same
(case and all), or non-zero otherwise.

Note that while the StrComp function has named constants that you can use as
the 3rd parameter (vbBinaryCompare, vbDatabaseCompare or vbTextCompare), you
can't use the named constants in a query.
 
SELECT *
FROM tblName
WHERE asc(left(FieldName,1)) = 115
OR asc(mid(FieldName,2,1)) = 102
OR asc(right(FieldName,1)) = 112
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Case sensitive query 19
case sensitive filter 5
Need Help with a Case-Sensitive 'Like' Query 4
combo help please 1
query match 4
Case sensitive password 1
Case sensitive joins 5
Age in Days If Then 5

Back
Top