Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: beginner: cursors

Re: beginner: cursors

From: <sybrandb_at_hccnet.nl>
Date: Tue, 10 Apr 2007 21:48:36 +0200
Message-ID: <v9qn135c8njpucvutkmbs54j9c539ivr5t@4ax.com>


On 10 Apr 2007 10:10:22 -0700, "matt" <reflection77_at_gmail.com> wrote:

>On Apr 10, 9:58 am, "matt" <reflectio..._at_gmail.com> wrote:
>> On Apr 10, 1:41 am, "dombrooks" <dombro..._at_hotmail.com> wrote:
>>
>> > Replace 'DECLARE' with 'CREATE OR REPLACE PROCEDURE <your_proc_name>
>> > AS'
>> > and you're pretty much done.
>>
>> I attempted to do this and receive a Procedure Created with
>> Compilation Errors.
>>
>> Here is what I altered from the initial post above:
>>
>> CREATE OR REPLACE PROCEDURE sp_seniority(
>> name OUT empbb02.ename%TYPE,
>> seniority OUT number,
>> TYPE cursor_var IS REF CURSOR,
>> myCursorVar OUT cursor_var;) AS
>--> name_list empbb02.ename%type,
>--> seniority_list number;
>
>> BEGIN
>>
>> Does that TYPE cursor_var also need to be specified as an OUT?
>
>correction...yet the same result.

Please always post explicit error messages. You can look them up by either issue
show errors
or
select * from user_errors where name=<your procedure name> Obviously this is documented.

Also, you can't define a TYPE in a formal parameter list of a procedure.
You can define a type on package level, or inside a procedure. Obviously this is also documented.

If you run to this newsgroup for everything you don't understand, you will notice you will get ignored soon, as most people responding here, did learn it by reading manuals, as Usenet didn't yet exist or was inaccessible.

-- 
Received on Tue Apr 10 2007 - 14:48:36 CDT

Original text of this message

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