Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 'accept' issue
> accept p_num prompt 'Please Enter a Number of Top Money Maker: '
> declare
> v_num number(2) := &p_num; -- p_num is a define/substition var, you'll
need to make a clear distinction between pl/sql features and sql*plus.
Accept and define are sql*plus features.
Btw, to print it using sqlplus simply issue
define p_num (or select '&p_num' from dual;)
> begin
> dbms_output.put_line (v_num);
> end;
> /
Hth,
Sybrand Bakker, Oracle DBA
<maximooxie_at_yahoo.com> wrote in message
news:883ull$54li$1_at_newssvr04-int.news.prodigy.com...
>
> Hi, there, I have problem with using 'accept'. Say in the following
> sample:
>
> -- using 'accept' to enter a value for use in the program
> accept p_num prompt 'Please Enter a Number of Top Money Maker: '
> declare
> v_num number(2) := p_num;
> begin
> dbms_output.put_line (v_num);
> end;
> /
> -- error message: identifier 'p_num' must be declared.
>
> Anybody give me some hints? Thanks a lot.
>
> Max
>
>
Received on Sat Feb 12 2000 - 10:21:24 CST