In addition to the reason for your error, which someone else has pointed
out, this piece of code has another problem -- you never close your cursor.
This will get you into no ends of trouble at some point in the future, so I
though I should point it out. Also, a cursor for loop would be much
cleaner, and you won't have to worry about closing the cursor. Like the
following...
declare
cursor c1 is
select nm_enum_data
from t_enum_data
where id_enum_data in
(select distinct id_view from t_acc_usage_1
union
select distinct id_view from t_acc_usage_2
union
select distinct id_view from t_acc_usage_3
);
--enum t_enum_data.nm_enum_data%type; Don't need this variable
declaration any more
begin
dbms_output.enable(900000); -- This can be a value up to 999999
for enumRec in c1 loop
dbms_output.put_line(enumRec.nm_enum_data);
end loop;
end;
/
Diana Duncan
TITAN Technology Partners
One Copley Parkway, Ste 540
Morrisville, NC 27560
VM: 919.466.7337 x 316
F: 919.466.7427
E: [EMAIL PROTECTED]
Harvinder Singh
<Harvinder.Singh@Metr To: Multiple recipients of list
ORACLE-L <[EMAIL PROTECTED]>
aTech.com> cc:
Sent by: Fax to:
[EMAIL PROTECTED] Subject: pl/sql problem
06/06/2001 06:05 PM
Please respond to
ORACLE-L
Hi,
i am running following code
declare
cursor c1 is
select nm_enum_data from t_enum_data where id_enum_data in
(select distinct id_view from t_acc_usage_1
union
select distinct id_view from t_acc_usage_2
union
select distinct id_view from t_acc_usage_3
);
enum t_enum_data.nm_enum_data%type;
begin
open c1;
loop
fetch c1 into enum;
exit when c1%notfound;
dbms_output.put_line(enum);
end loop;
end;
/
i am getting error:
declare
*
ERROR at line 1:
ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
ORA-06512: at "SYS.DBMS_OUTPUT", line 91
ORA-06512: at "SYS.DBMS_OUTPUT", line 58
ORA-06512: at line 16
What might be the reason????????
Thanks
Harvinder
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Harvinder Singh
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).