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

Index using UPPER function

Status
Not open for further replies.

Mockenrue

Programmer
May 15, 2002
40
NL
I want to create a case-insensitive index. I found an exemple on the net, but this doesn't seem to work.

Here's my case:



SQL> create table books (title varchar2(10),price number(2));

Table created.

SQL> desc books
Name Null? Type
------------------------------- -------- ----
TITLE VARCHAR2(10)
PRICE NUMBER(2)


SQL> insert into books (title,price)
2 values ('Peter Pan',5)

1 row created.

SQL> select * from books;

TITLE PRICE
---------- ---------
Peter Pan 5

SQL> CREATE INDEX upper_title_idx ON books (upper(title));
CREATE INDEX upper_title_idx ON books (upper(title))
*
ERROR at line 1:
ORA-00907: missing right parenthesis

Any ideas ?

I'm on:
Oracle8 Enterprise Edition Release 8.0.5.2.1 - Production
With the Objects option
PL/SQL Release 8.0.5.2.0 - Production
 
Check manuals, function-based index was introduced in 8i. You may convert title to uppercase in trigger or store original value and uppercase one in different fields.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top