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