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: truncating values on insert ?

Re: truncating values on insert ?

From: Cameron Abbott <cvabbott_at_altavista.com>
Date: Fri, 15 Feb 2002 08:12:33 -0500
Message-ID: <a4j12r$rom$1@bcarh8ab.ca.nortel.com>


You can try to use substr if the field that is too long is a varchar field. If the table has field XXX defined has varchar2(20) and YYY varchar2(10) you can insert into the table like so:

insert into table values (substr(val1,1,20),substr(val2,1,10));

This way you will never get inserted value too large for column.

HTH "news.netcologne.de" <joerg.jung_at_clarity-ag.net> wrote in message news:a4iuc5$h6h$1_at_news.netcologne.de...
> hi,
>
> is there a way to force oracle to truncate too large values automatically
on
> an per insert base ?
>
> thanx for help, jj
>
>
>
>
>
Received on Fri Feb 15 2002 - 07:12:33 CST

Original text of this message

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