Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL: Exiting to Operating System?
Greetings:
I'm kinda stumped with a question regarding PL/SQL scripts and how to exit to the OS when they are run using SQL*Plus. I'm writing some PL/SQL scripts that need to be run directly from the OS from a shell script and once they've run, control needs to return to the OS to continue processing the shell script. I am running the scripts using the
following:
sqlplus myname/mypswd_at_mydb @myscript.sql
I've noticed if I write a "pure" SQL script (i.e. no PL stuff) like a SELECT / INSERT / DELETE statement, I can put an EXIT statement as the last line and it works fine.
But, when I have to use PL constructs for variables, if-then-else, etc.,
I cannot use EXIT because it is reserved for exiting a loop. I've tried
with the RETURN statement but that only returns me to the SQL> prompt. Any information on this will be greatly appreciated.
Michael A. Casillas Received on Tue Aug 19 1997 - 00:00:00 CDT
![]() |
![]() |