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: How to stop the &1 prompt with no argument?

Re: How to stop the &1 prompt with no argument?

From: Andre Weber <WeberAndre_at_t-online.de>
Date: Sun, 4 Nov 2001 19:49:28 +0100
Message-ID: <9s42jg$nd6$06$1@news.t-online.com>


try

SET DEFINE OFF (disables the substitution of &... Variable inside the script -- )

"John" <john_at_nospam.com> schrieb im Newsbeitrag news:dk06utov7itcue5oaboegi0dhv3q9ddsjd_at_4ax.com...
> I run a regular report from Oracle 7.3.4 running on the Vax O/S.
> Sometimes the report is delayed when the database is late so I wish to
> send an email to the customer when the report is ready.
> To do this, I add one parameter - but only when there is a late start,
> (this is all handled by DCL) :
>
> SQL> @report DELAYED
>
> This sends an email to alert the customer by executing the temp.com
> DCL command file.
>
> Normally, it is on time so no parameter is supplied, but this always
> makes Oracle prompt for the missing parameter. How can I avoid the prompt
> when no parameter is supplied? The NVL() function does the same as decode.
> I can do a work around by always supplying a dummy parameter but this is
> not a good solution because it is never used. "$ set noon" is a "do
> nothing" Vax DCL command. Any suggestions much appreciated.
> John,
> Bracknell, UK.
> ................................
>
> set heading off
> set verify off
> -- normal report script here
>
> spool temp.com
> select decode(upper('&1'), 'DELAYED', '$ @sendemail.com', '$ set noon')
> from dual
> /
> spool off
> host @temp.com
> EXIT
>
Received on Sun Nov 04 2001 - 12:49:28 CST

Original text of this message

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