Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: a pl/sql question
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
> select title, volume, pages, year, journalid
> into ttl, vol, pg, yr, jid from ref where id=3D3Drn;
> begin
> select abbrev into jname from journal2abbrev
> where id=3D3Djid and medline=3D3D'Y';
> exception
> when others then select name into jname from journal where =3D
> id=3D3Djid;
> end;
>=20
-- 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 - 15:36:25 CDT
![]() |
![]() |