Re: copy from clob field into long field
Date: Wed, 29 Nov 2000 17:13:16 -0500
Message-ID: <pcfV5.73669$Z2.999261_at_nnrp1.uunet.ca>
Hi Joanna!
I've just checked and the sample below works fine:
create table tmp (id number, l long);
declare
l long;
offset pls_integer := 1;
len pls_integer;
begin
for c in (
select fragment
from html_fragment
where name = 'INDEXES BOTTOM'
) loop
len := dbms_lob.getlength(c.fragment);
dbms_lob.read(c.fragment,len,offset,l);
end loop;
insert into tmp values(2,l);
end;
select * from tmp;
desc html_fragment;
NAME VARCHAR2(30)
FRAGMENT CLOB
GATEWAY NOT NULL VARCHAR2(50)
Andrew Velichko
Brainbench MVP for Oracle Developer 2000
http://www.brainbench.com
"Joanna C" <joannac_at_peregrine.ie> wrote in message
news:903e5e$lll$1_at_kermit.esat.net...
> hi all,
>
> Is it possible to copy from clob field to long field using Oracle's
> packages?
>
> I know it is possible to copy data from long field to clob field.
>
> I have been trying to do the opposite (clob field to long field).
>
> The reason behind it is that we are trying to insert data into long field
.
>
> The data is approximately 120K. I know it is impossible to do it through
> sqlplus using pl/sql variable as it can only handle 32K of static text.
>
> If anyone has any suggestion on how to do (with code example), it will be
> fantastic.
>
> Any assistance is greatly appreciated.
>
> Thank you
>
> Regards,
> Joanna
>
>
Received on Wed Nov 29 2000 - 23:13:16 CET