Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: long fields update
Silvia Mazza wrote:
>
> Hi all,
>
> we have to update a long field.
> We cannot do this from sqlplus (too long input string).
> We tried to separate the value of the field in different pieces and to
> concatenate them by executing different updates, but it is not possible
> to concatenate the value of a long field.
> Is there somebody who has a piece of code (pl/sql or C) doing this? We
> are in a hurry for only 5 records!
> Our Oracle installation is version 7.3.4 on Nt.
> Thanks eveybody!
> Ciao Silvia
>
> --
> --------------------------------------------
> Quinary SpA, via Fara 35, 20124 Milan, Italy
> http://www.quinary.it
> mailto:S.Mazza_at_quinary.it
> tel +39-02-6774111 fax +39-02-67741156
> --------------------------------------------
If the long column is less than 32767 bytes, then you can use pl/sql to do it..otherwise its more complicated (ie C time)
In PL/SQL
declare
x varchar2(32767);
begin
select long_col
into x
from my_table
where col1 = ...
x := .... (new data etc etc)
update my_table
set long_col = x
where col1 = ...
end;
Have fun
--
"Some days you're the pigeon, and some days you're the statue." Received on Mon Sep 06 1999 - 06:20:50 CDT
![]() |
![]() |