Re: What's Wrong with this Procedure??

From: Ken Denny <ken_at_kendenny.com>
Date: Sun, 10 Mar 2002 13:41:51 GMT
Message-ID: <Xns91CD5984696AEkendenny_at_65.82.44.7>


"Some Person" <thesynner_at_hotmail.com> wrote in news:zsxi8.10999$af7.11107_at_rwcrnsc53:

> Ah, thanks. The select...into statement didn't seem right in this
> scenario, but I'm still to green in Oracle to know the proper syntax.
>
> I do want to return all the rows, and below is the syntax I currently
> have. It's close, but won't quite compile. Any assistance is
> appreciated...
>
> CREATE OR REPLACE PACKAGE pkgFIRES_BY_CAUSE AS
> TYPE rcursor IS REF CURSOR;
> PROCEDURE procFIRES_BY_CAUSE (prmBATTALION IN VARCHAR2, r_rcursor OUT
> rcursor);
> END;
>
>
> CREATE OR REPLACE PACKAGE BODY bodFIRES_BY_CAUSE IS
> PROCEDURE procFIRES_BY_CAUSE (prmBATTALION IN VARCHAR2, r_rcursor
> OUT
> rcursor)
> AS

You're trying to create a package body bodFIRES_BY_CAUSE where there is no package spec. The package spec and the package body must have the same name. That's how it knows which body goes with which spec.

-- 
Ken Denny
http://www.kendenny.com/

Blessed are those who have nothing to say and cannot be persuaded to say 
it. 
Received on Sun Mar 10 2002 - 14:41:51 CET

Original text of this message