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

Home -> Community -> Usenet -> c.d.o.tools -> Re: [Newbie] help :PL/SQL cursor

Re: [Newbie] help :PL/SQL cursor

From: Markus Schwabe <mschwabe_at_gscout.de>
Date: 2000/05/24
Message-ID: <8gg0hs$tr6$1@news4.muc.eurocyber.net>#1/1

Sebastien FERRANDEZ <sferrandez_at_wineandco.com> schrieb in im Newsbeitrag: 392AAB78.288DC102_at_wineandco.com...
> It helps a lot. I remember using something like 'Whenever notfound
 continue'
> or something like that in Pro*C some years ago.
> I didn't found something in standard SQL that'd say "exception when
> no_data_found continue"

For this you can write:

<snip>

LOOP
  FETCH Mon_curseur INTO I_PRIX,I_IDENTIF,I_OID,I_CAT;

BEGIN -- Around your SELECT with BEGIN...EXCEPTION...END

  SELECT ...

EXCEPTION                                  -- Here the exception that do
NOTHING
  WHEN No_Data_Found THEN
    NULL;
END;   EXIT WHEN Mon_curseur%NOTFOUND ; -- THE BONE OF CONTENTION !!!!

 END LOOP; <snap>

So the Exception do nothing and your
program will continue with working after the END-Statement.

HTH
Markus Received on Wed May 24 2000 - 00:00:00 CDT

Original text of this message

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