Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL block, won't accept accept
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
Received on Mon Jan 29 2007 - 10:09:46 CST