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: Varchar truncating question

Re: Varchar truncating question

From: Steffen Göck <stevie-g_at_gmx.de>
Date: Mon, 28 Aug 2000 18:45:30 +0200
Message-ID: <8oe4s8$n4i$13$1@news.t-online.com>

<bcliff_at_my-deja.com> schrieb in im Newsbeitrag: 8oe06i$bih$1_at_nnrp1.deja.com...
> Is there any way to get oracle to automatically truncate an entry into a
> varchar column if the entry is longer than the specified length?

create a rowlevel trigger for insert and update trigger on the table:

begin
:new.MyTextField := substr(:new.MyTextField ,1,TheMaxLength); end;

Steffen Received on Mon Aug 28 2000 - 11:45:30 CDT

Original text of this message

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