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

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

RE: Problem with Create Procedure Syntax

From: Afanassiev, Alex <Alex.Afanassiev_at_team.telstra.com>
Date: Tue, 30 May 2000 13:43:50 +1000
Message-Id: <10512.107053@fatcity.com>


Hi Dax

You need a / to execute the code.

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;
/

With regards
Alex Afanassiev
Oracle DBA, TOC Operations Support/IDO

Tel:	(03) 8 661 20 61
Fax:	(03) 9 650 36 74



> -----Original Message-----
> From: Dax Mickelson [SMTP:dax.mickelson_at_lightcom.net]
> Sent: Tuesday, May 30, 2000 1:24 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Problem with Create Procedure Syntax
>
> 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
> --------------------------------------------------------------------------
> -----------
> -
>
> --
> Author: Dax Mickelson
> INET: dax.mickelson_at_lightcom.net
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Mon May 29 2000 - 22:43:50 CDT

Original text of this message

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