Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: reset variables

Re: reset variables

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 23 Feb 2002 08:50:16 -0800
Message-ID: <a58h88012ma@drn.newsguy.com>


In article <hled7u4v0sajr5k2ebcbor1ea86c4msomj_at_4ax.com>, miker says...
>
>I run a sql script with &&1 for several variables, i.e all 9 instances
>of this variable get the same value. How do I get the script to
>prompt for new value only once when it is rerun in the same sql
>session? If I use &1 then it prompts me 9 times, once for each time
>this variable is used.

use UNDEFINE, eg:

set echo on

select &&1 from dual;
select &&1 from dual;
select &&1 from dual;
select &&1 from dual;

undefine 1

run that script -- it'll prompt you once at the beginning each time you run it.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Sat Feb 23 2002 - 10:50:16 CST

Original text of this message

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