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.

mitch77

Programmer
Nov 16, 2000
42
0
0
PT
Hi,
How can i disable the case sensitive, when executing a select?

Thanks, Mitch
 
Hi
You can change your session to the server by using the "SET SQLC MIXED|UPPER|LOWER" if the database is in one or other, MIXED will leave it asis.
Apart from that the UPPER function within DECODE is all I can think of at the moment.

Hope that gets you by..

Dave
 
If you don't want the case setting to apply to your entire session, just use the case-changing functions in your select statement:

SELECT col1, col2, ...,coln
FROM my_table
WHERE UPPER(employee_name) = 'SMITH';

One thing I have seen people do that really screws up the works is to forget what their target string should look like:

SELECT col1, col2, ...,coln
FROM my_table
WHERE UPPER(employee_name) = 'Smith'; <=== This will guarantee &quot;No Data Found&quot;!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top