Hello experts,
I have this below scenario.
set serveroutput ON;
DECLARE
l_val_test1 CLOB;
l_val_test2 CLOB;
BEGIN
l_val_test1 := Lpad('X', 32767, 'X');
--l_val_test2 := lpad('X',32768,'X'); This fails
FOR i IN 1..15 LOOP
l_val_test1 := l_val_test1|| l_val_test1;
END LOOP;
dbms_output.Put_line('Done');
EXCEPTION
WHEN OTHERS THEN
dbms_output.Put_line('No some exception: '||SQLERRM);
END;
The above one works properly when executed. But fails when I remove the comment as shown by the underlined text. I mean I am confused how this clob works in Oracle. Is it the problem of lpad that can not pad 32768 'X's or what? Because when I run the for loop, It works fine.
Regards,
Ranagal