Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: reset variables
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;
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 CorpReceived on Sat Feb 23 2002 - 10:50:16 CST