Re: How to query a text string when case is in upper and lower
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 13 Nov 2009 13:32:22 -0700
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]
.
- Follow-Ups:
- References:
- How to query a text string when case is in upper and lower
- From: LarissaR
- How to query a text string when case is in upper and lower
- Prev by Date: Re: Appendding to/from Upsize_ts (time stamp) field
- Next by Date: Re: Query and Combo Box
- Previous by thread: How to query a text string when case is in upper and lower
- Next by thread: Re: How to query a text string when case is in upper and lower
- Index(es):
Relevant Pages
|