Home » SQL & PL/SQL » SQL & PL/SQL » Re: ORU-10028: line length overflow, limit of 255 bytes per line
Re: ORU-10028: line length overflow, limit of 255 bytes per line [message #39191] Tue, 25 June 2002 09:52 Go to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
i beleieve it is a limitation with dbms_output.put_line.
This may be a workaround. use multiple put_lines.
SQL> get q2
  1  begin
  2  dbms_output.put_line
  3  ('33333333333333333333333333333333333333333333333333333333333333333
  4  3333333333333333333333333333333333333333333333333333333333333333333
  5  3333333333333333333333333333333333333333333333333333333333333333333
  6  3333333333333333333333333333333333333333333333333333333333333333333
  7  33333333333333333333333333333333333333333333333333333333333333');
  8  dbms_output.new_line;
  9* end;
SQL> /
begin
*
ERROR at line 1:
ORA-20000: ORU-10028: line length overflow, limit of 255 bytes per line
ORA-06512: at "SYS.DBMS_OUTPUT", line 99
ORA-06512: at "SYS.DBMS_OUTPUT", line 65
ORA-06512: at line 2

SQL> get q3
  1  declare
  2  str varchar2(1000);
  3  begin
  4  str:='33333333333333333333333333333333333333333333333333333333333333333
  5  3333333333333333333333333333333333333333333333333333333333333333333
  6  3333333333333333333333333333333333333333333333333333333333333333333
  7  3333333333333333333333333333333333333333333333333333333333333333333
  8  33333333333333333333333333333333333333333333333333333333333333';
  9  dbms_output.put_line(substr(str,1,250));
 10  dbms_output.put_line(substr(str,251,500));
 11  dbms_output.put_line(substr(str,501,750));
 12* end;
 13  /
33333333333333333333333333333333333333333333333333333333333333333
3333333333333333333333333333333333
333333333333333333333333333333333
333333333333333333333333333333333333333333333333333333333333333333
3
333333333333333333333333333333333333333333333333
3333333333333333333
33333333333333333333333333333333333333333333333333333333333333

PL/SQL procedure successfully completed.
Thanks, but is the output still in one line? [message #39193 is a reply to message #39191] Tue, 25 June 2002 10:22 Go to previous messageGo to next message
Traci
Messages: 2
Registered: June 2002
Junior Member
every time we do put_line, we are adding a newline character at the end, right?
Re: Thanks, but is the output still in one line? [message #39195 is a reply to message #39191] Tue, 25 June 2002 10:38 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
yes
Re: Thanks, but is the output still in one line? [message #39197 is a reply to message #39191] Tue, 25 June 2002 10:49 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
no...i was wrong.
every line is a different line....
SQL> ed
Wrote file afiedt.buf

  1  declare
  2  str varchar2(20);
  3  begin
  4  str:='123456789';
  5  dbms_output.put_line(substr(str,1,1));
  6  dbms_output.put_line(substr(str,2,1));
  7  dbms_output.put_line(substr(str,3,1));
  8  dbms_output.put_line(substr(str,4,1));
  9  dbms_output.put_line(substr(str,5,1));
 10* end;
SQL> /
1
2
3
4
5
wouldn't dbms_output.put_line generate a newline char each time, should I use dbms_output.put instea [message #39198 is a reply to message #39191] Tue, 25 June 2002 10:50 Go to previous message
Traci
Messages: 2
Registered: June 2002
Junior Member
thanks
Previous Topic: SELECT statement in DECODE
Next Topic: Re: To PL/SQL Experts: ORU-10028: line length overflow, limit of 255 bytes per line.
Goto Forum:
  


Current Time: Fri Apr 26 16:01:21 CDT 2024