seumas
asked on
Case-sensitive SQL Queries with Access Jet Engine
How do I get the VB4 Access Jet Engine to do case-sensitive queries? Eg.
SELECT * FROM someTable WHERE someField = 'i'
Here "someField" is assumed to be a text field, and I would like only 'i' records (and not 'I' records) to be returned. The default behaviour seems to be case-insensitive.
SELECT * FROM someTable WHERE someField = 'i'
Here "someField" is assumed to be a text field, and I would like only 'i' records (and not 'I' records) to be returned. The default behaviour seems to be case-insensitive.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry seumas but the table is not well, but you can get this table, on VB help.
ASKER
Hi,
I tried out this solution and it didn't work. The "Like" operator works fine in plain VB code, but in an SQL statement it is still case-insensitive. I got a solution from the newsgroup however:
SELECT * FROM someTable
WHERE someField = 'i'
AND StrComp([someField],'i',0) = 0 ;
Seumas
I tried out this solution and it didn't work. The "Like" operator works fine in plain VB code, but in an SQL statement it is still case-insensitive. I got a solution from the newsgroup however:
SELECT * FROM someTable
WHERE someField = 'i'
AND StrComp([someField],'i',0)
Seumas