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 -> Re: EXEC syntax for SP which returns row set

Re: EXEC syntax for SP which returns row set

From: IANAL_VISTA <IANAL_Vista_at_hotmail.com>
Date: Thu, 14 Jul 2005 02:17:14 GMT
Message-ID: <Xns9692C4345808FSunnySD@68.6.19.6>


m0002a_at_yahoo.com wrote in
news:1121298095.502989.33260_at_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
>
>

Ready, Fire, AIM.

Here is a free clue.
RTFM
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/toc.htm Received on Wed Jul 13 2005 - 21:17:14 CDT

Original text of this message

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