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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: resume on Exception

RE: resume on Exception

From: Weiss, Rick <rweiss_at_state.mt.us>
Date: Fri, 15 Oct 2004 09:15:09 -0600
Message-ID: <CB14899C052F44469B97E3FA54AD6F3D02C700F8@doaisd02001.state.mt.us>


Bob:

I'm pretty rusty on it, but the basics are:

WHILE foo
 LOOP    UPDATE xxx

      SET col1 =3D ***
    WHERE conditions;

   EXCEPTION
    WHEN OTHERS

     THEN
      Your error handling code here

   END;    Any other in LOOP code here.

END LOOP; As I said, it has been some time since I've done this, but I'm sure my = oversights will be promptly corrected.

Rick Weiss

Oracle Database Administrator
Technical Services Bureau
Central Services Division
MT Dept of Labor & Industry

Phone: (406) 444-9628
E-Mail: rweiss_at_state.mt.us

-----Original Message-----

From: Bob Metelsky [mailto:bobmetelsky_at_comcast.net] Sent: Friday, October 15, 2004 9:07 AM
To: oracle-l_at_freelists.org
Subject: resume on Exception=20

All, I know I can trap and exit on an exception but how can the program=20 trap and continue?

say I have

while <condition>

       update xxx where recnum ... ;
            if  any_exception then
                write any_exception & recnum to file and continue;
            end if;

end loop;

any examples of this logic?

Thanks!
Bob

--=20

"Oracle error messages being what they are, do not highlight the correct cause of fault, but will identify some other error located close to where the real fault lies."

--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l Received on Fri Oct 15 2004 - 10:10:40 CDT

Original text of this message

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