Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: automatic conversion to upper case!
Hi,
depends on what you are trying to do.
for a one-time conversion just update: update tab set mycol = upper(mycol) where mycol != upper(mycol);
if you have a lot of data, you might want to optimise this a little. (e.g. commit every 500 rows)
if you want this to happen for each insert, create a trigger:
create or replace trigger my_trig
before insert or update on tab
for each row
begin
:new.mycol := upper(:new.mycol);
end;
btw, you might want to add a check constraint, so nobody diables your trigger by mistake and screws you data.
Karsten
In article <7vdf2k$lao$1_at_nnrp1.deja.com>,
Nandakumar <N.Kumar_at_rocketmail.com> wrote:
>
>
> hi
>
> what would be the easiest way to make oracle convert the varchar2
values
> into upper case? ie to handle at the data base side.
>
> would appreciate any information in this regard!
> Thanks
>
> --
> Nandakumar
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Nov 01 1999 - 04:41:24 CST
![]() |
![]() |