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

Home -> Community -> Usenet -> c.d.o.server -> EXEC syntax for SP which returns row set

EXEC syntax for SP which returns row set

From: <m0002a_at_yahoo.com>
Date: 13 Jul 2005 16:41:35 -0700
Message-ID: <1121298095.502989.33260@g43g2000cwa.googlegroups.com>


I have a package and stored procedure as follows:

create or replace package TEST.ReturnCur is -- REF CURSOR type for returning result sets from procedures TYPE REF_CUR IS REF CURSOR;
END ReturnCur;

CREATE or replace PROCEDURE TEST.SPTEST
(C1 OUT ReturnCur.REF_CUR)

   AS
BEGIN
   open C1 for SELECT ID from TEST.EMPLOYEE; END; How do I test this procedure from SQL*Plus. When I use: exec sec.test2

I get the following error message:

BEGIN sec.test2; END;

*

ERROR at line 1:

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TEST2'
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

When I use: exec sec.test2()

I get the following error message:

BEGIN sec.test2(); END;

*

ERROR at line 1:

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TEST2'
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

When I use [ID is char(8)]: exec sec.test2('12345678')

I get:

BEGIN sec.test2('12345678'); END;

*

ERROR at line 1:

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TEST2'
ORA-06550: line 1, column 17:
PLS-00363: expression '12345678' cannot be used as an assignment target
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored Received on Wed Jul 13 2005 - 18:41:35 CDT

Original text of this message

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