Re: NO_DATA_FOUND EXCEPTION

From: Andrew McAllister <mcallister_at_grad.missouri.edu>
Date: 1995/05/06
Message-ID: <mcallister.88.0011D589_at_grad.missouri.edu>#1/1


In article <3ob7c9$2jjh_at_lamar.ColoState.EDU> ana_at_lamar.ColoState.EDU (Ana Silva) writes: snip header
>: In article <3nbutc$4sp_at_news.annex.com> sanctus2_at_annex.com () writes:
>: >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.
>: >
 

> SELECT * FROM table_name;
> EXCEPTION
> WHEN NO_DATA_FOUND THEN NULL;
>Ana

When I execute this on my server 7.0.16. My server core dumps and has a 50% chance of hanging my whole machine. Cool, huh?

Any generated exception causes this on my machine. Sounds like a bug, but I don't have support. I'm not too cheap to buy it, just that Oracle won't sell me bronze level for my platform (Oracleware 1.0 i.e. Oracle 7.0.16 on Unixware). I'd buy support if they'd promise me free upgrades like every other platform sold by oracle. (Sorry for the griping)

So to avoid system hangs, I just do a select count(*) x from table; and check x > 0. Slows processing down, but works great.

Andy

Andrew McAllister -- mcallister_at_grad.missouri.edu Office of Research, University of Missouri-Columbia The views above are my own, and NOT those of my employer. Received on Sat May 06 1995 - 00:00:00 CEST

Original text of this message