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: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 29 Jan 2007 08:09:46 -0800
Message-ID: <1170086986.480436.96930@s48g2000cws.googlegroups.com>

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

Original text of this message

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