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: Optional Prompting for Parameters

Re: Optional Prompting for Parameters

From: EscVector <EscVector_at_gmail.com>
Date: Tue, 19 Jun 2007 01:18:00 -0000
Message-ID: <1182215880.966595.290760@g4g2000hsf.googlegroups.com>


On Jun 14, 4:39 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> <faceman28..._at_yahoo.com> a écrit dans le message de news: 1181852233.994342.4..._at_x35g2000prf.googlegroups.com...
> |I would like to have an SQL script that will prompt for parameters
> | that are not given.
> |
> | If I do
> |
> | @test 10
> |
> | it will run silently.
> |
> | If i do
> |
> | @test
> |
> | It will respond
> |
> | Enter Employee ID:
> |
> | How might one do this?
> |
>
> You can't.
>
> Regards
> Michel Cadot

I agree in part that "you can't".

It is easy enough to pass input via &1 &2 etc. syntax. Getting to prompt if the input is null is the hard part.

I've tried with a simple ACCEPT &1 PROMPT 'ENTER EMPLOYEE ID: ' and get double prompted.

 Using a named variable or fine requires circular syntax that assigns or binds the passed number value to allow for the prompt and that double prompted too.

My best guess is that an anonymous block and GOTO could work in this case, but haven't tried it yet. Received on Mon Jun 18 2007 - 20:18:00 CDT

Original text of this message

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