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 -> SQL Plus: procedural problem

SQL Plus: procedural problem

From: Ed Steinman <esteinma_at_umich.edu>
Date: 1997/02/21
Message-ID: <330E164B.3CDC@umich.edu>#1/1

I am in search of the proper product to handle a problem:

A sql script that is something like:

DECLARE
BEGIN
some pl/sql processing
EXCEPTION
insert of error codes into an error table END;
....

more pl/sql processing
....

@purgrpts -- calling another sql script
....

exit

What I want to do is to look at the error table after the first pl/sql block finishes. If there are any errors logged I want the sql script to exit. So just after the "END;" statement there would be code something like:

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?

-- 
===========================================================================
Ed Steinman                            What the Zen Buddhist said to the
Computing Unit, School of Dentistry    hot dog vendor:
University of Michigan
Ann Arbor, MI 48109-1078               "Make me one with everything."
voice: 313-764-9850
FAX: 313-647-4024
e-mail: esteinma_at_umich.edu
Received on Fri Feb 21 1997 - 00:00:00 CST

Original text of this message

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