Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: a pl/sql question
I think you need exception here. It will error out if no row found. It will not go to :
IF SQL%NOTFOUND THEN. "Freeman, Donald" <dofreeman_at_state.pa.us> wrote: I don't know if it will improve performance but since you know that in a = certain number of cases you will get a SQL%NOTFOUND why not use IF/THEN = to deal with it instead of throwing an exception?
select title, volume, pages, year, journalid
into ttl, vol, pg, yr, jid from ref where id=3Drn;
begin
select abbrev into jname from journal2abbrev
where id=3Djid and medline=3D'Y';
IF SQL%NOTFOUND THEN
select name into jname from journal where id=3Djid;
END IF;
end;
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Jacques Kilchoer
> Sent: Thursday, April 29, 2004 4:09 PM
> To: oracle-l_at_freelists.org
> Subject: RE: a pl/sql question
>=20 >=20
>=20
>=20
>=20
>=20
>=20
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- --------------------------------- Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Apr 29 2004 - 16:55:06 CDT
![]() |
![]() |