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: <fitzjarrell_at_cox.net>
Date: 15 Jul 2005 19:41:43 -0700
Message-ID: <1121481703.239612.248740@o13g2000cwo.googlegroups.com>

Mark A wrote:
> <fitzjarrell_at_cox.net> wrote in message
> news:1121478509.051291.146710_at_g49g2000cwa.googlegroups.com...
> >
> > Yet it doesn't compare to the stored procedure shown above, which does
> > have an OUT parameter, even though you refuse to admit the fact.
> > Please show us a DB2 stored procedure, coded with an OUT parameter just
> > as the Oracle sample you've provided, and show us how you can call it
> > without passing the required variables.
> >
> > David Fitzjarrell
> >
> I don't understand your point. The DB2 example has a return cursor like the
> Oracle SP, and neither has any other OUT parm.
>
> Obviously, you consider the return cursor in the Oracle SP an out parm. So
> what? What is your point?

It's apparent you missed the point entirely. For Oracle you coded this:

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

    AS
 BEGIN
    open C1 for SELECT ID from TEST.EMPLOYEE;  END; Yes, the OUT parameter in this particular case is a reference cursor, but it need not be. And, yes, it IS an OUT parameter as specified in the code creating the procedure. As such, the procedure will error when the proper arguments are not supplied, as you well know.

Possibly I misinterpreted this statement from you:

"I admit that I am new to Oracle stored procedures, but that certainly is not
the case in other databases I have worked with htat OUT paramters are supplied when calling a stored procedure."

They are if the procedure is coded to use them. It appears to me you're stating you can code a stored procedure with an OUT parameter and then call that same procedure absent any variable to receive the output without error. As such I am asking you to back up your statement with proof. Should I have misinterpreted your statement forgive me, for your language was vague.

David Fitzjarrell Received on Fri Jul 15 2005 - 21:41:43 CDT

Original text of this message

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