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: sqlplus / passing variable to all instances

Re: sqlplus / passing variable to all instances

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 13 Feb 2006 20:53:32 -0500
Message-ID: <-_KdnRA_T9mBpWzeRVn-oA@comcast.com>

"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

Original text of this message

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