Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UPPER expression with LIKE comparison
Message
From
23/02/2004 20:07:53
 
General information
Forum:
Oracle
Category:
Other
Miscellaneous
Thread ID:
00880074
Message ID:
00880132
Views:
19
Example 1
The following statement creates function-based index IDX on table EMP based on an uppercase evaluation of the ENAME column:

CREATE INDEX idx ON emp (UPPER(emp_name));


Now the SELECT statement uses the function-based index on UPPER(EMP_NAME) to retrieve all employees with names that start with JOH:

SELECT * FROM emp WHERE UPPER(emp_name) LIKE 'JOH%';

This is from the Oracle documentation.

HTH,



>we have a index with this expression - UPPER{"CLASTNAME")
>
>our sql statement
>Select * from MyTable where UPPER("CLASTNAME") LIKE 'SMITH%'
>
>every time we run this, oracle does a full table scan, this is bad when we expect to have over 4 million records in this table.
>
>what am I missing or can't we ever use UPPER() with LIKE ???
>
>
>TIA
>Mark
William Chadbourne
Senior Programmer/Analyst
State of Maine - DAFS App Team

Oracle - When you care enough to use the very best!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform