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: Automatic UPPER conversion on an Insert

Re: Automatic UPPER conversion on an Insert

From: Ole Christian Meldahl <konocm_at_statoil.com>
Date: Fri, 22 Oct 1999 08:55:26 +0200
Message-ID: <38100A5E.8FFE45E2@statoil.com>

Victor Yu Valenzuela wrote:

> no way .. except using triggers... no other option..
>
> Sam wrote in message <7untl9$rb$1_at_ffx2nh3.news.uu.net>...
> >Yup, that was the obvious One. Is there any way to Enforce this conversion
> >at the Column defn ( User defined fns ? )

> >Peter Okhiria <peter.okhiria_at_mci.com> wrote in message
> >news:380F2465.3F240811_at_mci.com...
> >> why not use the upper() function to do the conversion at the point of
> >> insertion/update...

Is that necessarily true? You could check it with a column constraint, but as Victor said not actually convert.

Sorry about the norwegian error message, but you get the picture:

SPORT: U606> CREATE TABLE TEST
  2 (
  3 TEST VARCHAR2(3) NOT NULL
  4 CHECK (test = upper(test))
  5 )
  6 /

Table created.

SPORT: U606> INSERT INTO test(test) VALUES ('ONE');

1 row created.

SPORT: U606> INSERT INTO test(test) VALUES ('Two'); INSERT INTO test(test) VALUES ('Two')
*
ERROR at line 1:
ORA-02290: kontrollskranken (SPORT.SYS_C002259) er overtrådt

SPORT: U606> DROP TABLE TEST
  2 /

Table dropped. Received on Fri Oct 22 1999 - 01:55:26 CDT

Original text of this message

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