Home » Developer & Programmer » Reports & Discoverer » TOO_MANY_ROWS_FOUND . This is exception (Oracle 9i)
TOO_MANY_ROWS_FOUND . This is exception [message #300555] Sat, 16 February 2008 00:05 Go to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi friends,

This is exception?

TOO_MANY_ROWS_FOUND

Mano
Re: TOO_MANY_ROWS_FOUND . This is exception [message #300564 is a reply to message #300555] Sat, 16 February 2008 01:58 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Yes.
Do you have any code contains "select ... into..." in the report?
Mostly it is getting more than one row, as select into (without bulk collect) can handle only one row.

By
Vamsi
Re: TOO_MANY_ROWS_FOUND . This is exception [message #300619 is a reply to message #300564] Sat, 16 February 2008 15:15 Go to previous messageGo to next message
Littlefoot
Messages: 20897
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Actually, Oracle's predefined exception name is TOO_MANY_ROWS (not TOO_MANY_ROWS_FOUND).
SQL> l
  1  declare
  2    l_ename emp.ename%type;
  3  begin
  4    select ename into l_ename
  5    from emp;
  6  exception
  7    when too_many_rows_found then               --> WRONG!
  8      dbms_output.put_line('Too many rows');
  9* end;
SQL> /
  when too_many_rows_found then
       *
ERROR at line 7:
ORA-06550: line 7, column 8:
PLS-00201: identifier 'TOO_MANY_ROWS_FOUND' must be declared
ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated


SQL>
SQL> l7
  7*   when too_many_rows_found then
SQL> c/_found//
  7*   when too_many_rows then
SQL> l
  1  declare
  2    l_ename emp.ename%type;
  3  begin
  4    select ename into l_ename
  5    from emp;
  6  exception
  7    when too_many_rows then                     --> CORRECT!
  8      dbms_output.put_line('Too many rows');
  9* end;
SQL> /
Too many rows

PL/SQL procedure successfully completed.

SQL>
Re: TOO_MANY_ROWS_FOUND . This is exception [message #300777 is a reply to message #300619] Mon, 18 February 2008 01:49 Go to previous message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Oops! I misread the OP entirely.

By
Vamsi
Previous Topic: D2k Report Help
Next Topic: How to show current tiem in report
Goto Forum:
  


Current Time: Wed Dec 07 02:53:20 CST 2016

Total time taken to generate the page: 0.08573 seconds