Re: How to query a text string when case is in upper and lower

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Fri, 13 Nov 2009 11:07:01 -0800, LarissaR
<LarissaR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have access to a database that shows a list of department names in our
company. The format for entering the names wasn't standardized, so the text
can have combinations of upper and lower case. I know in SQL it's easy to
say, "look for this word, but pretend everything you see is in lower case."
Is there a similar way to do that in a regular Access query? I need to run a
partial match, so I'll be using the "Like" statement.
Thanks for your time!

Access queries are not case sensitive. LIKE "*fred*" will find records
containing fred, Fred, or FRED with no special coding needed.

If you want case sensitivity, or if the query is being run by SQL/Server or
another engine which is case sensitive, you may need to use

WHERE LCase([fieldname]) = LCase([Enter criterion:])

but that will certainly give a performance hit.

--

John W. Vinson [MVP]
.



Relevant Pages

  • Re: case sensitivity in access
    ... ACCESS does not support case sensitivity for searching/matching directly. ... ACCESS treats all characters as upper case when using InStr, InStrRev, Like, ... You can use the Asc() function to find specific upper or lower case ... Dim intL As Integer ...
    (microsoft.public.access.forms)
  • Re: How to query a text string when case is in upper and lower
    ... "John W. Vinson" wrote: ... Is there a similar way to do that in a regular Access query? ... If you want case sensitivity, or if the query is being run by SQL/Server or ...
    (microsoft.public.access.queries)
  • Re: Case sensitivity
    ... > So I would propose that Forth move towards lower case standard control ... > structure words, and case sensitivity. ... Rather than support the upper case words ... control structure words in upper ...
    (comp.lang.forth)
  • Re: Case sensitivity
    ... whole dimension of expressiveness, a sentiment with which I agree.) ... So I would propose that Forth move towards lower case standard control ... structure words, and case sensitivity. ... Rather than support the upper case words ...
    (comp.lang.forth)
  • Re: CLisp case sensitivity
    ... >> sensitivity to case is likely coming to Lisp. ... Only the default reader setting converts everything to upper case: ... Modula-2 and Modula-3 are case sensitive and define their ...
    (comp.lang.lisp)