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: PL/SQL block, won't accept accept

Re: PL/SQL block, won't accept accept

From: Mitch <spudtheimpaler_at_gmail.com>
Date: 29 Jan 2007 08:21:19 -0800
Message-ID: <1170087679.330678.157010@j27g2000cwj.googlegroups.com>

On Jan 29, 4:09 pm, "Vladimir M. Zakharychev" <vladimir.zakharyc..._at_gmail.com> wrote:
> On Jan 29, 6:27 pm, spudtheimpa..._at_gmail.com wrote:
>
>
>
> > Hey,
>
> > I've searched yet not found.
>
> > I have a simple procedure I am trying to set up:
>
> > [code]
>
> > CREATE OR REPLACE PROCEDURE TTT_MakeAMove AS
> > BEGIN
> > ACCEPT TTT_PlayerMoveColumn PROMPT 'Please select a Column for your
> > move: ';
> > ACCEPT TTT_PlayerMoveROW PROMPT 'Please select a Row Number for your
> > move: ';
> > DBMS_OUTPUT.PUT_LINE('You have chosen cell '||TTT_PlayerMoveColumn||
> > TTT_PlayerMoveROW);
> > END;
>
> > [/code]
>
> > Which won't compile. When I show errors:
>
> > [output]
> > Errors for PROCEDURE TTT_MAKEAMOVE:
>
> > LINE/COL
> > -----------------------------------------------------------------------
> > ---------
> > ERROR
> > -----------------------------------------------------------------------
> > ---------
> > 3/10
> > PLS-00103: Encountered the symbol "TTT_PLAYERMOVECOLUMN" when
> > expecting one of t
> > he following:
>
> > := . ( @ % ;
>
> > [/output]
>
> > I believe it is to do with the variables (I'm new at this). However,
> > IIRC Procedures dont use declare, and variables in brackets before the
> > begin are for those transferred in/out of the procedure.
>
> > If it is variables, what is it i am missing? If not, then what is it
> > I've not taken in?
>
> > Thanks in advance
>
> > Mitch.
>
> > (P.S, TTT = TicTacToe)ACCEPT is an SQL*Plus command, not a PL/SQL keyword... Further
> reading:http://www.oracle.com/pls/db102/to_toc?pathname=appdev.
> 102%2Fb14261%2Ftoc.htm
>
> Regards,
> Vladimir M. Zakharychev
> N-Networks, makers of Dynamic PSP(tm)
> http://www.dynamicpsp.com

That would be it then...

OK, thanks for that. Time for a redesign.

I am currently looking, but if anyone knows of any tricks/best practices to get a user input from within a PL/SQL block (If possible, which it looks like it isnt), it would be appreciated.

Cheers.

Mitch. Received on Mon Jan 29 2007 - 10:21:19 CST

Original text of this message

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