Re: NO_DATA_FOUND EXCEPTION

From: Randy Dewoolfson <randyd_at_cais3.cais.com>
Date: 1995/05/07
Message-ID: <3oh3a6$8m0_at_news.cais.com>#1/1


Scott Mattes (Scott_Mattes_at_NAVSEALOG.I-Net.com) wrote:
: sanctus2_at_annex.com () wrote:
 

: >In PL/SQL, if I do a SELECT INTO or a FETCH that returns 0 records, the
: >NO_DATA_FOUND EXCEPTION is raised. That's all well and good but what do
: >I do with it? If I write code to only do something if I RETRIEVE
: >records, why can't I ignore the NO_DATA_FOUND? It ends up generating an
: >error in my trigger and rolls back my transaction.
 

: >I want to be able to retrieve no records WITHOUT erroring out my trigger.
 

: >I'd appreciate any help on this issue.
: >Thanx....
 

: >Jack Schwartz
: >Systems Analyst
: >Great Western Bank
 

: Being new to all this I may be missing something, but from what I have
: read and what you say you want to do I would code an exception handler
: that basicly ignored that error so that my block could continue on
: (the pl/sql book I have says that I would use 'when others' and put a
: do nothing type of pl/sql command in it's body and then after it was
: done execution would return to the line of code just after the one
: that caused the exception).

Exactly.

--
---------------------x--------------------------------------------
Randy DeWoolfson :-) |                Success in all undertakings
     ergo sum        | My opinions are my own - you know the rest
---------------------x--------------------------------------------
Received on Sun May 07 1995 - 00:00:00 CEST

Original text of this message