Case sensitivity

  • Thread starter Thread starter R. Smith
  • Start date Start date
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?
 
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.
 
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.
 
Back
Top