Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case-sensitivity within Access

Status
Not open for further replies.

MarketAn

Technical User
Oct 12, 2000
12
0
0
US
I know that Visual Basic is not case-sensitive, but it preserves the capitalization where the name is declared. I have a need to capture only lower case characters in a single field. I would think this coule be accomplished with a siple query, however, I cannot find the correct syntax. Can anyone help? [sig][/sig]
 
LCase Function

Syntax

LCase(string)

The required string argument is any valid string expression. If string contains Null, Null is returned.

Remarks

Only uppercase letters are converted to lowercase; all lowercase letters and nonletter characters remain unchanged. [sig]<p>Bill Paton<br><a href=mailto:william.paton@ubsw.com>william.paton@ubsw.com</a><br><a href= Check out my website ![/sig]
 
Thank you for the reply, however, I am not looking to convert text. I am trying to select off records from a table based on one field that contains a single upper and lower case character (i.e. A,a,B,b). The results of the sucessful query will only contain the lower case character. I can't find a function that will only select the lower case characters. Any assistance would be appreciated. Thank you. [sig][/sig]
 
There is no easy solution to this but you could use the ASC function :

SELECT Asc(YourTableName.TheField) AS ASCvalue, YourTableName.TheField
FROM YourTableName
WHERE (Asc(YourTableName.TheField)=97);

This will return all the &quot;a&quot;

What you could do is create a table of ASCII numbers for the lower case letters and join them.

Create a table ( Table1 ) with one field - Character - and populate it with you lower case chacters.

Use this SQL to create th ASCII table

SELECT Asc([Table1.Character]) AS ASCvalue, Table1.Character
INTO tblASCII FROM Table1;

Jon SQL will be:

SELECT YourTableName.TheField
FROM YourTableName INNER JOIN tblASCII ON Asc(YourTableName.TheField) = tblASCII.ASCvalue;



Hope this helps, Good Luck [sig]<p>Bill Paton<br><a href=mailto:william.paton@ubsw.com>william.paton@ubsw.com</a><br><a href= Check out my website ![/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top