Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Basic SQL Code Help
Try something like this, an SQL script which executes other existing
SQL scripts depending on user choice:
SET VERIFY OFF;
SET PAGESIZE 0;
PROMPT MENU;
PROMPT -------------------;
PROMPT 1. Sales Report; PROMPT 2. Production Report; PROMPT 3. Employee Report;
set termout off;
SPOOL temp.sql;
SELECT decode('&choice','1','@sales;', '2','@product;', '3','@employee;','??Invalid Selection')FROM DUAL;
On Mon, 23 Nov 1998 21:07:08 -0500, Ryan Jennings <c2mxrsj1625_at_fre.fsu.umd.edu> wrote:
>I need to construct a menu in an [**.sql] format, start it, prompt the
>user for input given a set of options, depending on user input, the user
>may see different tables and views. Have tried if ifelse statements,
>prompt and accept, prompt works but is only half of the problem please
>help.
>
Received on Tue Nov 24 1998 - 09:40:25 CST
![]() |
![]() |