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

Home -> Community -> Usenet -> c.d.o.tools -> Re: 'accept' issue

Re: 'accept' issue

From: John Blackburn <John.D.Blackburn_at_transport.qld.gov.au>
Date: 2000/02/15
Message-ID: <88aj3m$kck1@hp013.qdot.qld.gov.au>#1/1

The accept command "accept's" a value into a substitution variable, which are substituted before sqlplus sends the command to oracle.

So you would need to say something like:

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;
/

<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 Tue Feb 15 2000 - 00:00:00 CST

Original text of this message

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