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: Equivalent of hold cursor in pl/sql

Re: Equivalent of hold cursor in pl/sql

From: <rgadd_at_my-dejanews.com>
Date: Wed, 21 Apr 1999 23:50:40 GMT
Message-ID: <7flo8e$3r5$1@nnrp1.dejanews.com>

Try placing the cursor before the procedure in the package body.

Don't forget to provide a procedure to close the cursor.

-Rick

In article <7flb3r$ni3$1_at_nnrp1.dejanews.com>,   narenn_at_my-dejanews.com wrote:
> I wrote a small package with fetches rows in a table.
> The pseudo code looks like this
>
> procedure abc ( fi_id in number ) is
> cursor xyz is select .................
> begin
> open xyz;
> loop
> fetch xyz into ....
> exit when not found;
> end loop;
> close xyz;
> end abc;
>
> loop for a list of fi_id's
> package.abc(current fi_id);
> end loop;
>
> This takes too much time. Looks like the open/close cursor every time is
> eating up lots of resources. I cannot do one fetch because the list of fi_id
> could be random. How do i do something like hold_cursor in pl/sql. I have
> done this is proc*c or oci. Any ideas ?
>
> Thanks
>
> -Naren
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Apr 21 1999 - 18:50:40 CDT

Original text of this message

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