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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie PL/SQL question

Re: Newbie PL/SQL question

From: Mike Krolewski <mkrolewski_at_rii.com>
Date: Mon, 29 Jan 2001 19:48:44 GMT
Message-ID: <954heo$ble$1@nnrp1.deja.com>

In article <954c0c$o78$1_at_venus.telepac.pt>,   "Araxes Tharsis" <pnrmaia_at_hotmail.com> wrote:
> I want to create a script that shows a menu and depending on the
 choice runs
> another script.
> But the script in PL/SQL is not accepting the start command inside
 the BEGIN
> and END.
> Help appreciated,
> Araxes
>
>

You cannot do this in between a begin-end block. When SQLPlus sees the begin-end, it presumes this is an anonymous PL/SQL block. SQLPlus commands are not allowed within the PL/SQL block.

There may be a trick or two that could be done using a stored function.. like

        select <stored function(parameter1,para2,..)> into :x from dual;

And then use the :x to perform the other tasks. I cannot think of anything of the top of my head.

Often this is why people use perl or c/c++ to develop the front end. Within perl, you could display the menu, get user responses, execute a PL/SQL block, use the returned variables/information for subsequent actions including other SQLPlus scripts. I have done it this way. Basically, use perl to concatanate SQLPlus scripts together .

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rii.com
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Mon Jan 29 2001 - 13:48:44 CST

Original text of this message

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