Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie PL/SQL question
Following SQL*Plus script will show menu and run another scripts depending on choice. It looks ugly but works.
set echo off feedback off pages 0
prompt Select an Action from following ugly menu:
accept choice prompt 'Action1 (1 default), Action2 (2), Action3 (3)' default
1
col action_script new_val action_script noprint select decode(&&choice, 1, 'action1.sql', 2, 'action2.sql', 3, 'action3.sql', 'noaction.sql') action_script from dual;
@&&action_script
-- ----------------------------------------------------- Thanks, Mark "Araxes Tharsis" <pnrmaia_at_hotmail.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:954c0c$o78$1_at_venus.telepac.pt...Received on Mon Jan 29 2001 - 15:04:17 CST
> 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
>
>