Capital/Small Letters in Text

S

selene

Hallo
I have a problem with text format.
A lookup-table contains textstrings 003A and 003a. Access2003 does not
differentiate between these. But actually they code different things.
What shoul I do?
Thank you for help
 
K

Ken Snell \(MVP\)

You can use the Chr function to differentiate between the two. Chr function
uses the ASCII value of a character to return the actual character.

This query will find the one with capital A:

SELECT *
FROM TableName
WHERE FieldName = '003A' And
Right(FieldName, 1) = Chr(65);


This one will find the one with small a:

SELECT *
FROM TableName
WHERE FieldName = '003A' And
Right(FieldName, 1) = Chr(97);
 
D

Douglas J. Steele

Might be a little simpler to use

SELECT *
FROM TableName
WHERE StrComp([FieldName], '003A', 0) = 0

or

SELECT *
FROM TableName
WHERE StrComp([FieldName], '003a', 0) = 0
 
Top