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: help needed on executin a stored proc

Re: help needed on executin a stored proc

From: Tony K <tony_krawczyk_at_dell.com>
Date: 2000/06/26
Message-ID: <8j8j95$m7o$1@galaxy.us.dell.com>#1/1

variable rcur refcursor;
variable arg_param varchar2(100);

begin
 :arg_param = 'appropriate param';
 char100proc(:rcur, :arg_param);
end

print rcur;

<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

Original text of this message

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