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

Home -> Community -> Mailing Lists -> Oracle-L -> Problem with Create Procedure Syntax

Problem with Create Procedure Syntax

From: Dax Mickelson <dax.mickelson_at_lightcom.net>
Date: Mon, 29 May 2000 20:13:53 -0600
Message-Id: <10512.107048@fatcity.com>


What is wrong with this statement?

create procedure add_comm(emp_id number, new_comm number) as begin
update emp set comm=comm+new_comm where empno=emp_id; end add_comm;

I have tried to create this and this is what I get:

SQL> create procedure add_comm(emp_id number, new_comm number) as

   2 begin
   3 update emp set comm=comm+new_comm where empno=emp_id;    4 end add_comm;
   5
   6 .
SQL> I have to use the period to get back to the SQL prompt.

What am I doing wrong. I get no creating the procedure (which I don't think it is creating the procedure) and if I try to use the created procedure I get this:

SQL> execute add_comm(1234,456);
BEGIN add_comm(1234,456); END;

       *
ERROR at line 1:

ORA-06550: line 1, column 7:
PLS-00201: identifier 'ADD_COMM' must be declared
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

SQL>



Dax Mickelson -- CCNA, CCAI, OCP/DBO, CNA

____EFGH_JKLM___QRSTUVWXYZ


Received on Mon May 29 2000 - 21:13:53 CDT

Original text of this message

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