Re: NO_DATA_FOUND EXCEPTION

From: Scott Mattes <Scott_Mattes_at_NAVSEALOG.I-Net.com>
Date: 1995/05/03
Message-ID: <3o7usl$345_at_pubxfer3.news.psi.net>#1/1


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). Received on Wed May 03 1995 - 00:00:00 CEST

Original text of this message