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 -> Re: Case-insensitive unique index

Re: Case-insensitive unique index

From: Scott Harden <sharden_at_uiuc.edu>
Date: 1997/08/27
Message-ID: <3404D669.753C@uiuc.edu>#1/1

Mark Wagoner wrote:
>
> What is the best way to ensure a unique column value without storing the
> column in upper-case? I want to store the value as the user entered it but
> ensure that it is not a duplicate if case is ignored. I tried to create a
> unique constraint using UPPER(colname) but Oracle did not like it.
> --
> Mark Wagoner
> mwagoner_at_no.spam.medplus.com
>
> To reply, remove no.spam from my mail address.

How about creating a one column table with a primary key, convert the user's input to upper and attemp an insert to this table, if it succeeds proceed with the case insensitive insert into your main table, if it fails then you have a duplicate and can notify the user as such. Received on Wed Aug 27 1997 - 00:00:00 CDT

Original text of this message

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