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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Plus: procedural problem

Re: SQL Plus: procedural problem

From: Pauli Salmu <pauli.salmu_at_pp.kolumbus.fi>
Date: 1997/02/24
Message-ID: <33113052.6A85@pp.kolumbus.fi>#1/1

Ed Steinman wrote:
> select count(*) into errs from err where error_num = 12;
> if errs>0 then
> exit;
> end if;
>
> Of course, "exit" doesn't work this way in pl/sql. And there is no way
> to pass values from pl/sql to sql*plus. My question: what is the best
> product to handle something like this: oraperl, Pro*C, SQR (a reporting
> tool but it has a lot of other capabilities) or something else?

You could do it with sqlplus only: write two "subprogram" scripts, one for exit and one for continued processing and make your script after that END statement:

spool dynascript.sql
select decode(count(*), 0, '@continue', '@exit') from err where error_num = 12;
spool off
@dynascript

I din't test anything, but you get the idea... Received on Mon Feb 24 1997 - 00:00:00 CST

Original text of this message

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