Re: Find uppercase letter in a string
- From: "Gary Walter" <gary@xxxxxxxxxxx>
- Date: Thu, 5 Oct 2006 11:13:46 -0500
"Arts" wrote:
I have field KRITERIUM containing strings for example Biii(aii) or Biii(D1)
an so on. I want to select all rows that contains uppercase letters
anywhere
in the string. I want to get 2 rows where there is 2 uppercase letters. Is
it
possible?
I have tried StrComp and Mid but I don't understand how I can get any
uppercase letter in the string(the first or the fifth or...)
--
I would think StrComp would get the job done...
if the job is to identify rows that contain uppercase
letters anywhere in the string....
Maybe I have missed something, but what are your
results if you add the following to a Field row in an
empty column of your query design grid?
TestUpper: StrComp([KRITERIUM], LCase([KRITERIUM]),0)
it should be doing a binary compare of the field
with the lower case form of itself...
if they are equal, it should return 0
(meaning no uppercase letters)
if different, it should return either 1 or -1
(meaning there must be an uppercase letter)
if field is NULL, will return Null
(will assume you don't care about Null)
so, in Criteria row
<> 0
or, you can complete expression in Field row
HasUpper: StrComp([KRITERIUM], LCase([KRITERIUM]),0) <>0
then set Criteria to -1 or True
.
- Prev by Date: Re: One-to-Many Query
- Next by Date: Re: need to extract specific characters from field
- Previous by thread: Re: IIF Syntax
- Next by thread: Re: Find uppercase letter in a string
- Index(es):