Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: where NO_DATA_FOUND exception

Re: where NO_DATA_FOUND exception

From: Edzard <edzard_at_volcanomail.com>
Date: 28 Oct 2002 10:59:00 -0800
Message-ID: <5d75e934.0210281059.1f078767@posting.google.com>


Hello,

There is still a point in the original message that needs to be clarified. Why does the exception NO_DATA_FOUND get ignored (when called from within SQL). I wrote some other example to make the question clear. Please see the output below.

Thanks, Edzard Pasma

SQL> create function fu1 return varchar2 is   2 begin
  3 raise no_data_found;
  4 return 'x';
  5 end;
  6 /

Function created.

SQL>
SQL> create function fu2 return varchar2 is   2 begin
  3 raise too_many_rows;
  4 return 'x';
  5 end;
  6 /

Function created.

SQL>
SQL> select fu1 from dual;

FU1


SQL>
SQL> select fu2 from dual;
select fu2 from dual

       *
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows ORA-06512: at "RAPT.FU2", line 3 Received on Mon Oct 28 2002 - 12:59:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US