Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: a pl/sql question

RE: a pl/sql question

From: Guang Mei <gmei_at_incyte.com>
Date: Thu, 29 Apr 2004 16:50:14 -0400
Message-ID: <NJEDKDKJDGAKAEKKNEEJEEIDDCAA.gmei@incyte.com>


Hi:

Thanks for your suggestion. However my thinking is to avoid the calling of "begin ... end" block, rather than the exception in it to "reduce the overhead" of calling pl/sql block.

Guang

> 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;



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 - 15:45:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US