Case sensitivity

R

R. Smith

How do I make query's in MS-Acces that use case
sensitivity to compare values in two different
tables 'adresses' and 'streets'.
For example:
SELECT adres
FROM adresses
WHERE street IN
(SELECT streetname FROM streets);

I have a table with adresses that with different types of
streetnames. Like "BAKER STREET" and "Baker Street" which
I would like to compare with a straat name table that
contains the proper names. So I only want to select "Baker
Street" and not "BAKER STREET".

How do I achieve this?
 
J

John Vinson

How do I make query's in MS-Acces that use case
sensitivity to compare values in two different
tables 'adresses' and 'streets'.
For example:
SELECT adres
FROM adresses
WHERE street IN
(SELECT streetname FROM streets);

I have a table with adresses that with different types of
streetnames. Like "BAKER STREET" and "Baker Street" which
I would like to compare with a straat name table that
contains the proper names. So I only want to select "Baker
Street" and not "BAKER STREET".

How do I achieve this?

You cannot. Access queries are obstinately case-insensitive.

What you *can* do is use the VBA function StrComp() to compare two
strings to see if they are identical. Open the VBA editor and search
the Help for StrComp for details.
 
G

Guest

Hm, I wonder why Access can't do this. In my opinion, it's
very essential to be able to establish this. I will look
at the VBA function too, but using VBA is much more
complicated than using a simple SQL query.

Thanks for the information.
 

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