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 09:34:15 -0800
Message-ID: <1170092054.987150.14370@s48g2000cws.googlegroups.com>


So far this is my work around:

[code]

CREATE OR REPLACE PROCEDURE TTT_Move_Proc(aTTT_PlayerMoveColumn IN VARCHAR2, aTTT_PlayerMoveRow IN VARCHAR2) AS
BEGIN
  DBMS_OUTPUT.PUT_LINE('You chose cell: '||aTTT_PlayerMoveColumn|| aTTT_PlayerMoveRow);
END;
/

ACCEPT TTT_PlayerMoveColumn PROMPT 'Please select a Column for your move: ';
ACCEPT TTT_PlayerMoveRow PROMPT 'Please select a Row Number for your move: ';
EXECUTE TTT_Move_Proc(TTT_PlayerMoveColumn, TTT_PlayerMoveRow);
[/code]

With an error as such:

[output]

SQL> @TTT_Move

Procedure created.

Please select a Column for your move: A
Please select a Row Number for your move: 2 BEGIN TTT_Move_Proc(TTT_PlayerMoveColumn, TTT_PlayerMoveRow); END;

                    *

ERROR at line 1:
ORA-06550: line 1, column 21:
PLS-00201: identifier 'TTT_PLAYERMOVECOLUMN' must be declared
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored
[/output]

Now I'm mostly comfused as the line it claims to error on isn't in my file. I don't know if execute does some substitution but that has stumped me a bit. Secondly again I think it's the variables causing me trouble.

Does anyone know a workaround? Basically I'm just after using variables passed to a procedure but it is giving me grief.

Cheers!
Mitch. Received on Mon Jan 29 2007 - 11:34:15 CST

Original text of this message

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