Re: PL-SQL: Exception NO_DATA_FOUND or %NOTFOUND

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 07 Jul 2002 16:57:43 +0200
Message-ID: <felgiucddh36binb023b8amh786usmm6s8_at_4ax.com>


[Quoted] On 7 Jul 2002 06:49:39 -0700, Thomas Kyte <tkyte_at_oracle.com> wrote:

>incorrect.
>
> open c;
> fetch c into ...;
> if c%notfound then .....
>
>the above code makes sense and properly detects the no data found condition
>whereas:
>
> open c;
> begin
> fetch c into ...;
> exception
> when no_data_found then .....
> end;
>
>won't "work" -- it's a bug in the code. It'll never ever detect that "no data
>was found" since the no_data_found exception is raised only when you use a
>SELECT INTO.
I did differentiate between exception and condition, did I? I never said a FETCH INTO raises the NO_DATA_FOUND exception, did I? Maybe I shouldn't have used the phrase 'raise condition' You could also argue about 'night and day different' [Quoted] In *both* cases sqlnet on the client side receives the ora-1403 error message. And it has always mightily suprised me error messages are being sent from server to client *in full*, as you will *always* get ora-1403, either expected or unexpected. Looks a waste of resources to me. But then we are probably both nitpicking.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sun Jul 07 2002 - 16:57:43 CEST

Original text of this message