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: Insert value in CLOB

Re: Insert value in CLOB

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Tue, 28 Aug 2001 09:29:48 +0200
Message-ID: <9mfh9c$9k0$1@s1.read.news.oleane.net>


<csyang_at_cisco.com> a écrit dans le message news: 3B8B03D1.A07D514C_at_cisco.com...
> Hello everyone,
>
> I have searched through the web and gotten to nowhere, so I wrote my
> question to bother whomever read this newsgroup.
>
> My question is how do I insert more than 4K of text into a CLOB column.
> I have seen examples of using SQL command "INSERT," but I know it fails
> when the text is above 4K. Therefore, how do I insert the large text?
> Thanks.
>
>
> Chien
>

v815> create table t (col clob);

Table created.

v815> declare

  2     l_data long := rpad('x',5000,'x');
  3     l_clob clob;
  4  begin
  5     insert into t values ( empty_clob() ) returning col into l_clob;
  6     dbms_lob.writeappend( l_clob, length(l_data), l_data );
  7 end;
  8 /

PL/SQL procedure successfully completed.

v815> set long 10000
v815> select * from t;

COL


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<snip>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1 row selected.

--
Hope this helps
Michel
Received on Tue Aug 28 2001 - 02:29:48 CDT

Original text of this message

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