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

Case sensitive

Status
Not open for further replies.

NickyB

Programmer
May 11, 2001
21
0
0
GB
Is it possible to set Oracle (version 7) to be case insensitive, so records would be found in the database for the following if the field t_name contained 'TEST':

SELECT * FROM T1 WHERE t_name = 'test'
SELECT * FROM T1 WHERE t_name = 'Test'
SELECT * FROM T1 WHERE t_name = 'TEST'

I know that I can work round this by converting all my SQL comparisons using UPPER, but I am convinced there must be another way.

 
Yes, there is. Lower, and Initcap. :p

Sorry if that's fascecious, but the truth of the matter is Oracle 7 doesn't have any other way to address what you're trying to do.

Some databases have an "ignore case" flag that can be set for the entire database. Oracle does not, and thus case-insensitive queries have long caused problems, not with coding them, but with their performance (since indexes are typically not used to determine the result until 8i).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top