Home » SQL & PL/SQL » SQL & PL/SQL » I don't want to raise NO-DATA-FOUND. How to do that? (split)
I don't want to raise NO-DATA-FOUND. How to do that? (split) [message #253515] Tue, 24 July 2007 02:59 Go to next message
imed
Messages: 1
Registered: July 2007
Location: Paris
Junior Member
hi

i dont want to raise the exception "no dat found" in my procedure

is there a solution

can you help me pleas ???
Re: I don't want to raise NO-DATA-FOUND. How to do that? (split) [message #253522 is a reply to message #253515] Tue, 24 July 2007 03:16 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> begin
  2    raise no_data_found;
  3  end;
  4  /
begin
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 2

SQL> begin
  2    raise no_data_found;
  3  exception
  4    when no_data_found then null;
  5  end;
  6  /

PL/SQL procedure successfully completed.

Regards
Michel

[Updated on: Tue, 24 July 2007 03:18]

Report message to a moderator

Re: I don't want to raise NO-DATA-FOUND. How to do that? (split) [message #253523 is a reply to message #253515] Tue, 24 July 2007 03:16 Go to previous message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Please, do not "steal" other topics - open a new one for your problem.

So you don't want to raise an exception. What do you want to do? Nothing? If so, do exactly that - nothing:
BEGIN
  SELECT ...
  INTO ...
  FROM ...

EXCEPTION
  WHEN NO_DATA_FOUND THEN NULL;
END;
Previous Topic: add field at position 144
Next Topic: how to put create procedure script inside logic block
Goto Forum:
  


Current Time: Thu Dec 08 12:37:57 CST 2016

Total time taken to generate the page: 0.20095 seconds