Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Index Lowercase

623219Feb 5 2010 — edited Feb 22 2010
Hi there!

I got a doubt here about index creation and I hope you can help me here, please.

I´m trying to create an index in a table, specifying which this index must be in lowercase.

The table has a lot of columns but I just need the index for three columns only in lowercase.

I tried something:

SQL> create table teste(a varchar2(10),
2 b varchar2(10));

Table created.

SQL> insert into teste values ('teste','Teste');

1 row created.

SQL> insert into teste values ('Teste','testE');

1 row created.

SQL> insert into teste values ('TeSte','tEsTe');

1 row created.

SQL> insert into teste values ('tesTe','TesTe');

1 row created.

SQL> commit;

Commit complete.

------------------------
-- First Attempt --
------------------------

SQL> create index teste_ix on teste (lower(a,b));
create index teste_ix on teste (lower(a,b))
*
ERROR at line 1:
ORA-00909: invalid number of arguments

-----------------------------
-- Second Attempt --
-----------------------------

SQL> create index teste_ix on teste ((lower(a,b)));
create index teste_ix on teste ((lower(a,b)))
*
ERROR at line 1:
ORA-00909: invalid number of arguments

--------------------------
-- Third Attempt --
--------------------------

SQL> create index teste_ix on teste (UPPER(a,b));
create index teste_ix on teste (UPPER(a,b))
*
ERROR at line 1:
ORA-00909: invalid number of arguments

-------------------------------------------------
-- tried to cut off the parenthesis --
-------------------------------------------------

SQL> create index teste_ix on teste lower(a,b);

Index created.


Thanks in advance!

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 22 2010
Added on Feb 5 2010
5 comments
4,853 views