Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String concatenation to clob variable

user10316500Feb 19 2018 — edited Feb 20 2018

Hi

I have this table

create table SIUCREDITO.CLOBTABLE

(

ID   varchar2 (20),

CAMPO   clob,

LOG_DATA   timestamp (6) default systimestamp not null

);

and this procedure that insert into the table above:

create or replace procedure SIUCREDITO.insproc (campo clob, id varchar2)

is

pragma autonomous_transaction;

begin

insert into clobtable (campo, id)

  values (campo, id);

commit;

exception

when others

then

rollback;

end insproc;

The test script:

declare

vCLob   clob := 'zz';

begin

for x in 1 .. 1000000

loop

vClob   := vClob || 'a';

end loop;

siucredito.insproc (vClob, 'aa');

end;

If I launch the script it works fine. Why ?

I concat a string to a clob and the concat operator is applied to strings.

32767 bytes are exceeded.

This post has been answered by mathguy on Feb 19 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2018
Added on Feb 19 2018
6 comments
6,566 views