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: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 15 Jun 2007 17:57:35 +0200
Message-ID: <4672b6ef$0$2128$426a34cc@news.free.fr>

"OneMan" <om_at_nospam.org> a écrit dans le message de news: MPG.20dcbde498305db4989683_at_news.plus.net...
| In article <1181852233.994342.4530_at_x35g2000prf.googlegroups.com>,
| faceman28208_at_yahoo.com says...
| > 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?
|
|
| The following will let you call the script with parameters or prompt you
| if left out:
|
| e.g.
|
|
| set echo on
| def pdate = &1 /* p1: date (ddmmyy) */
| set echo off
|
| SELECT TO_CHAR( TO_DATE('&pdate', 'ddmmyy'), 'dd-Mon-rrrr') AS mydate
| FROM DUAL;
|
| undef 1
| undef pdate

This is not what it is asked.
I don't see any "Employee ID" or the like in what you posted.

Regards
Michel Cadot Received on Fri Jun 15 2007 - 10:57:35 CDT

Original text of this message

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