Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus / passing variable to all instances
"Joe" <jchristl_at_zdnetmail.com> wrote in message
news:1139861071.972316.193460_at_z14g2000cwz.googlegroups.com...
: I've tried:
:
: ACCEPT BOX NUMBER PROMPT ' Please Enter the Box: '
:
: But if the script sees another & symbol later on (&BOX), it tries to
: populate it again!
:
accept empno prompt 'Empno: '
select ename, deptno, sal
from emp
where empno = &empno;
select ename, empno, deptno, sal
from emp
where deptno = (select deptno from emp where empno = &empno);
don't bother with 'NUMBER' in the ACCEPT command -- it does little worthwhile
if your script resembles the above example, you shouldn't be getting another prompt (but it's been a long, long time -- not sure if 7.??? had some wierd quirks, but i don't recall any)
did you look up '&&'?
++ mcs Received on Mon Feb 13 2006 - 19:53:32 CST