PL/SQL (MOSC)

MOSC Banner

DBMS_LOB.SUBSTR on 11.1.0.7 AIX

edited Jun 23, 2010 6:39PM in PL/SQL (MOSC) 3 commentsAnswered
Hi All,

    Did anyone tried the below stub which is gives only 8192 character from DBMS_LOB.substr. Here I am expecting 9331 as the lenght but it stops at 8192

declare
     l_clob CLOB;
     l_num number;
     f2 CLOB;
begin

     for i in 1 .. 42100
       loop
       l_num :=i;
       if i > 32768
       then
          l_clob := l_clob||'a';
      else
          l_clob := l_clob||'~'||'a';
       end if;

  end loop;

  l_clob := l_clob||'~';

  f2 := DBMS_LOB.SUBSTR ( l_clob, 9331, 32768 );

  dbms_output.put_line ('succ '||dbms_lob.getlength(f2));
  dbms_output.put_line ('succ '||l_num);

 exception
 when others
 then
   dbms_output.put_line(' seee my dear '||l_num);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center