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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Unique key with capatilizing

Re: Unique key with capatilizing

From: Jürgen Lietz <jlietz_at_talknet.de>
Date: Fri, 13 Nov 1998 16:44:49 +0100
Message-ID: <swY22.260$ud6.7786@news.tli.de>


Try adding an extra column 'colname_unique' with unique constraint enabled.

Then use a trigger

create or replace trigger zzz before insert on zzztbl  for each raw
begin
:new.collname_unique:=upper(:new.collname) end;

Juergen Lietz

Nicolas Bronke schrieb in Nachricht <72hanj$3vs$1_at_news01.btx.dtag.de>...
>This idea is not bad, but I am looking for a little bit different. With this
>trigger you only get uppercase entries.
>I would like to have entries with upper/lowercase but not in different type
>cases.
>E.g.
>1. Example
>First Entry Oracle - should be allowed and stored like it is
>any other entries like oracle, ORACLE are violating the entry.
>2. Example
>First Entry ORACLE - should be allowed and stored like it is
>any other entries like oracle, Oracle are violating the entry.
>etc.
>Kind regards
>Nicolas Bronke
>
>victor schrieb in Nachricht <01be0ef8$f3139e20$6b14abcc_at_victor>...
>>
>>
>>Nicolas Bronke <NBronke_at_t-online.de> wrote in article
>><72f34q$f5a$1_at_news00.btx.dtag.de>...
>>you can use triger
>>create or replace trigger zzz before insert on zzztbl
>> for each raw
>>begin
>>:new.collname:=upper(:new.collname)
>>end;
>>
>>
>>and you can insert any cases of OrAcLe
>>but in table will be only ORACLE
>
>
>
Received on Fri Nov 13 1998 - 09:44:49 CST

Original text of this message

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