Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: I just want to run a stored procedure...
codefragment_at_googlemail.com wrote:
> Hi
> I have a stored procedure that I want to run.The shell of it is
> included at the bottom of this
> post. I try running the below in sqlplusw and get the following
> result.
> Can you just run stored procedures in oracle in the same manner you
> can in query analyser
> in MS Sql?
>
> thanks
>
> > exec CODE0 (1,1)
> BEGIN CODE0; END;
>
> *
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00201: identifier 'CODE0' must be declared
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
>
>
>
> CREATE OR REPLACE PACKAGE "CODE0" AS
> TYPE CUR IS REF CURSOR;
> PROCEDURE CODE0 (pCUR1 OUT CUR,
> pARG1 IN NUMBER,
> pARG2 IN NUMBER);
> END CODE0;
> GO
>
> CREATE OR REPLACE PACKAGE BODY "CODE0" AS
> PROCEDURE CODE0 (pCUR1 OUT CUR,
> pARG1 IN NUMBER,
> pARG2 IN NUMBER) IS
> BEGIN
> DECLARE
> pLocal1 NUMBER(2);
> BEGIN
> pLocal2 := ISVISIBILITYENABLED();
>
> OPEN pCUR1 FOR
>
> <--------sql here------->
>
> END;
> END CODE0;
> END CODE0;
> GO
>
Does "GO" actually work? That is a SQL Server construct. Try using "/" instead.
And also follow David's advice.
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - Unknown -- Posted via a free Usenet account from http://www.teranews.comReceived on Thu Jun 28 2007 - 11:42:37 CDT