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: Serge Kosourikhin <kosour_at_braz.ru>
Date: Tue, 30 May 2000 13:15:15 +0900
Message-Id: <10512.107054@fatcity.com>


You have to use backslash to run CREATE-statement. Using period just terminate editing of current statement, but not execute its.

to ensure that procedure was created, execute next select :

select * from user_source where name = 'ADD_COMM';

Serge Kosourikhin
Oracle DBA
JSC Bratsk Aluminium Plant
----- Original Message -----
From: Dax Mickelson <dax.mickelson_at_lightcom.net> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Sent: Tuesday, May 30, 2000 12:23 PM
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
> also send the HELP command for other information (like subscribing).
Received on Mon May 29 2000 - 23:15:15 CDT

Original text of this message

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