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 -> Problem with fetch@cursor

Problem with fetch@cursor

From: <deltondm_at_my-deja.com>
Date: Fri, 10 Sep 1999 17:01:31 GMT
Message-ID: <7rbdh2$k24$1@nnrp1.deja.com>


Hello Guys,

    I have the following cursor declared

cursor allcount (st_pol varchar2, ed_pol varchar2)is   select a.polnum,polfrq,servun,taxsta,covsta,covdue,nxtdte,plnnum,

         polmod,coveff,nonfor,decode(nonfor,'ETI','POETI',

'RPU','PORPU',
'POAUT') forcode
from covmas b,polmas a /*+ POLMAS_PK_POLNUM */ where b.polnum = a.polnum and b.covnum = 1 and b.covdue > b.coveff and a.polnum between nvl(st_pol,a.polnum) and nvl(ed_pol,a.polnum);

I use it as follows

    ...
    open allcount( 'xxx','yyyy' );
    loop

       fetch allcount into c;
       exit when allcount%notfound;
       ..

    end loop;
    close allcount;

The problem is that all the fetches return quickly except the last one that is suppose to return not found. Indexes are on polmas.polnum and covmas.polnum+covmas.covnum

Thanks for any help as to what can be causing this problem.

Delton.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Sep 10 1999 - 12:01:31 CDT

Original text of this message

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