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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT query and case-SENSITIVE 1

Status
Not open for further replies.
May 5, 2000
168
US
Here's the problem;

Example:

Record 1 contains fielda with the value "T-ball"
Record 2 contains fielda with the value "T-Ball"
Record 3 conatins fielda with the value "T-BALL"

If you execute SELECT * FROM table WHERE fielda = "T-ball"
you will get all 3 records returned because the "WHERE" is always case-INsensitive.

I want to know if I can make the "WHERE" case-SENSITIVE so only one record is returned. ie the one with "T-ball" and not the other 2.

Also, if you execute SELECT fielda as division, GROUP BY fielda;

You get a result of one because it groups all 3 records as being equal.
 
Hello Jane;

This will work inside of Access:
SELECT * FROM Table1
WHERE (((StrComp([Table1]![fielda],"Apple",0))=0));

In other databases, there might be problems since StrComp is a function and not a SQL reserved word.

Hope this helps,
Chell

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top