Query for lowercase characters

A

Al K

I need to query both upper and lower case letters from a table, but when I
run the following query:

SELECT * FROM table
WHERE (((table.Key)="a"));

I get records with a key of "A" and "a".

How do I specify criteria to just get the lower case "a" record?

Thank you.

Al K
 
A

Al K

Hi Kelvin-

Thanks very much.

I did think of that, but was hoping for a "cleaner" method. Isn't there a
way to directly query lower case letters?

Al

----- Original Message -----
From: "Kelvin" <[email protected]>
Newsgroups: microsoft.public.access.queries
Sent: Thursday, February 26, 2004 2:01 PM
Subject: Re: Query for lowercase characters
 
B

Bas Cost Budde

Al said:
Hi Kelvin-

Thanks very much.

I did think of that, but was hoping for a "cleaner" method. Isn't there a
way to directly query lower case letters?
AFAIK not with Jet. Or you could write a function that does the same
thing... this method is quite clean, actually, better than comparing the
ascii code to 65... (97 that should be for lower case. Unless you have a
Macintosh. But then you have no Access. Now, whatever)
 
K

Kelvin

There is the StrComp function which is case sensative.

SELECT * FROM table
WHERE (strComp(table.Key,'a',0)=0);

I don't know if this is "cleaner", but it will work on entire words or
phrases.

Kelvin
 

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

Top