Case Sensitive Key?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using data from an external system. Keys in this system are case
sensitive so that 444zD is not the same as 444zd. When I join two tables in
a query using this key, Access considers both of these key values as the
same.

Is there some way I can tell Access that 444zD does not mean the same thing
as 444zd?

Thanks
 
I am using data from an external system. Keys in this system are case
sensitive so that 444zD is not the same as 444zd. When I join two tables in
a query using this key, Access considers both of these key values as the
same.

Is there some way I can tell Access that 444zD does not mean the same thing
as 444zd?

Not with a JOIN, and not with indexes, no. They are recalcitrantly
case-insensitive.

John's suggestion of using StrComp() is the only getaround (other than
creating a proxy field containing the hexadecimal expansion of the
character string).

John W. Vinson[MVP]
 
Not with a JOIN, and not with indexes, no. They are recalcitrantly
case-insensitive.

John's suggestion of using StrComp() is the only getaround (other than
creating a proxy field containing the hexadecimal expansion of the
character string).

I presume that in practice it's best to restrict the recordset as far as
possible with joins and indexes before applying the slow StrComp()
operations, something like

SELECT AKey, AField, BField
FROM A INNER JOIN B ON AKey=BKey
WHERE StrComp(AKey, BKey, 0) = 0
 
Back
Top