Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help needed on executin a stored proc
declare
cv proccursortypes.char100_cur;
begin
char100_proc(cv,'<whatever>');
end;
/
Or you could have created and defined your cursor as a weak cursor (without
type definition)
and use
variable cv refcursor
before the execute.
Hth,
Sybrand Bakker, Oracle DBA
<rangneka_at_my-deja.com> wrote in message news:8j8b6j$qkn$1_at_nnrp1.deja.com...
> I have created the following package and proc:
>
> CREATE OR REPLACE PACKAGE PROCCURSORTYPES AS
> TYPE CHAR100_CUR IS REF CURSOR RETURN CHAR100TABLE%ROWTYPE;
>
> END PROCCURSORTYPES;
> /
>
> CREATE OR REPLACE PROCEDURE CHAR100PROC (
> CHAR100_CV IN OUT PROCCURSORTYPES.CHAR100_CUR,
> CHAR100_PARAM IN CHAR100TABLE.CHAR100FIELD%TYPE)
> AS
> BEGIN
> OPEN CHAR100_CV FOR SELECT * FROM CHAR100TABLE WHERE
> CHAR100FIELD=CHAR100_PARAM;
> END CHAR100PROC;
> /
>
> My applications can call and run this procedure no prblem with the
> corect data returned.
>
> My question is this: How would I call this procedure in SQL Plus?
>
> In SQL Plus I've tried:
>
> execute procedure name (cursor,param)
>
> but to no avail.
>
> Any ideas?
> Should the cursor parameter be set to 0?
>
> Any help would be appreciated.
>
> Shantanu
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Jun 26 2000 - 00:00:00 CDT