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: Jörg Jung <joerg.jung_at_clarity-ag.net>
Date: Fri, 15 Feb 2002 14:23:41 +0100
Message-ID: <a4j24i$s1d$1@news.netcologne.de>


hi cameron,

thanx for your reply.
of course i know about substr, but i want to be lazy. in my opinion an option to force oracle to ignore too large values is o.k., because of saving "write-work" for large insert-statements.

regards, jj

"Cameron Abbott" <cvabbott_at_altavista.com> schrieb im Newsbeitrag news:a4j12r$rom$1_at_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:23:41 CST

Original text of this message

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