RE: a pl/sql question

  • From: "Guang Mei" <gmei@xxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 29 Apr 2004 16:50:14 -0400

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@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: