• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1134
  • Last Modified:

Execute nested scripts in sqlplus

I have created an oracle script (execute_ky.sql)  that can execute other scripts in the current directory as follows:
@AAA.sql
@BBB.sql
@CCC.sql

It executes just the first script and returns from sqlplus to the operative system command line.
I think the behaviour is right as each internal script has the last statement
 exit;
How can I avoid this behavoiu and enable it to continue executing all the scripts in the list
despite the fact they have the last statement as exit.

OS: Windows 7
DB: Oracle 10
0
diteps06
Asked:
diteps06
1 Solution
 
slightwv (䄆 Netminder) Commented:
>>they have the last statement as exit.

Remove the exit.

or possibly crate a shell script/BAT file that makes three sqlplus calls:
sqlplus user/password @AAA.sql
sqlplus user/password @BBB.sql
sqlplus user/password @CCC.sql
0
 
diteps06Author Commented:
For business reasons I cann't remove the exit statement
Thanks alot the second functions
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now