Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: truncating values on insert ?
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