Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Case-insensitive uniqueness?

Case-insensitive uniqueness?

From: David Fetter <dfetter_at_shell4.ba.best.com>
Date: 12 Nov 1999 05:02:45 GMT
Message-ID: <382b9f75$0$233@nntp1.ba.best.com>


Kind people,

I'd like to make sure that names are unique modulo case. One way of doing this that I thought would be elegant and understandable looks like this:

CREATE TABLE foo (
  foo_id INTEGER NOT NULL PRIMARY KEY
, foo_desc VARCHAR2(255) NOT NULL
, UNIQUE(LOWER(foo_desc))

)
/

Alas, this is not to be. Instead of something helpful, Oracle 8.0.5.1 Enterprise Edition for Linux says:

, UNIQUE(LOWER(foo_desc))

              *
ERROR at line 4:
ORA-00907: missing right parenthesis

What's going wrong here, and how do I fix it?

Thanks in advance for any help, tips, etc.

Cheers,
David.
--

            David Fetter         888 O'Farrell Street Apt E1205
       dfetter_at_best.com           San Francisco, CA 94109-7089 USA
  http://www.best.com/~dfetter     +1 415 567 2690 (voice)
print unpack ("u*",q+92G5S="!!;F]T:&5R(%!E<FP_at_2&%C:V5R"@``+)

"The sobering anwer is yes--the white community is so entitled because...it is the advanced race...it is more important...to affirm and live by civilized standards...than to bow to the demands of the numerical majority."

                                        William F. Buckley, racist pig
Received on Thu Nov 11 1999 - 23:02:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US