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: How can I call a SQL Plus script from a PL/SQL script?

Re: How can I call a SQL Plus script from a PL/SQL script?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 16 Jul 2002 15:36:49 GMT
Message-ID: <3D343D58.D0A2D339@exesolutions.com>


mbiker wrote:

> I have some SQL Plus scripts that help me load data. I now need to
> add some more complicated logic so PL/SQL is required. The PL/SQL
> will need a loop which calls the existing SQL Plus scripts passing a
> date.
>
> Is this possible?
>
> Rewriting the existing SQL Plus scripts to use PL/SQL would be a large
> job. These scripts work and have been in production for a while. I
> would like to avoid making major changes.
>
> Thanks,
> Don

What you are looking for is an 'anonymous block'.

DECLARE
-- your variables here
BEGIN
-- your code here inlcuding loops, IF-THEN-ELSE, whatever END; Or a stored procedure if you want to store it permanently in the database.

Daniel Morgan Received on Tue Jul 16 2002 - 10:36:49 CDT

Original text of this message

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