DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: ORA-06502: PL/SQL: numeric or value error

Threaded View

  1. #4
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Are you sure is lr_log_dtl.object_id of VARCHAR2?

    Code:
    SQL> declare
      2  ls_message_body2 long DEFAULT ' Hello Long ' ;
      3  object_id varchar2(10) DEFAULT ' Object Id' ;
      4  field1 varchar2(10) DEFAULT ' f1 ' ; 
      5  field2 varchar2(10) DEFAULT ' f2 ' ; 
      6  field3 varchar2(10) DEFAULT ' f3 '  ; 
      7  field4 varchar2(10) DEFAULT ' f4 ' ; 
      8  field5 varchar2(10) DEFAULT ' f5 ' ;
      9  nCnt number default 0;
     10  begin
     11  loop
     12  ls_message_body2 := ls_message_body2 || 
     13  object_id || CHR(9) ||
     14  field1 || CHR(9) || 
     15  field2 || CHR(9) || 
     16  field3 || CHR(9) || 
     17  field4 || CHR(9) || 
     18  field5 || CHR(13);
     19  
     20  if ncnt = 3 then
     21  exit;
     22  else
     23    ncnt := ncnt + 1;
     24    dbms_output.put_line(ncnt);
     25  end if;
     26  end loop;
     27  dbms_output.put_line(ls_message_body2);
     28  end;
     29  /
    1
    2
    3
    Hello Long  Object Id    f1      f2      f3      f4      f5 
     Object Id  f1      f2      f3      f4     
    f5 
     Object Id   f1      f2      f3      f4      f5 
     Object Id  f1      f2      f3      f4      f5 
    
    
    PL/SQL procedure successfully completed.
    
    SQL>
    or what is the size of fields? field1 to field5. sum it up (field1+2+3+4+5+ object_id), it might be too large and because of that it is overflowing..
    Last edited by Sameer; 11-27-2002 at 07:19 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width