| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PLSQL Data Type supporting more then 32760 characters
Use LONG (which I would discourage actually) or look up information on
CLOB/BLOB .
On 27 Jul 2003 21:27:57 -0700, pareshrshah_at_yahoo.com (Paresh Shah)
wrote:
>Hi,
>
>I m facing a problem with Oracle PLSQL block.
>I have written a PLSQL, which appends a string to a variable & that
>process is
>in loop, but it gives error when maximum limit is reached i.e.
>32787(approx)
>but I want to store more characters in that string. can anyone help me
>with this
>below is sample of my code
>
>**********************************************************
>DECLARE
> str varchar2;
>BEGIN
> loop
> exit when length(str)>50000;
> str := str || 'hi how r u?\n';
> end loop;
>END;
>**********************************************************
>
>when I execute this code, it gives following error
>**********************************************************
>ERROR at line 1:
>ORA-06502: PL/SQL: numeric or value error
>ORA-06512: at line 6
>**********************************************************
>
>
>
>I know it is problem of data type varchar2 which stores only 32787
>characters,
>If anybody can tell me how do I store more than 32787 characters in a
>variable using PLSQL block.
>
>
>Regards
>Paresh shah
MylxHQ - Oracle Resource Portal
http://oracle.mylxhq.com
bsc7080mqc_at_mylxhp.com
(replace mylxhp with mylxhq to reply/contact)
Received on Mon Jul 28 2003 - 06:14:30 CDT
![]() |
![]() |