Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Posts
    56

    Unanswered: How to write a pl/sql program that will run irrespective of any exceptions

    Hello Friends,

    I am processing millions of records using pl/sql procedure. I want to make my program robust so that I should log the exceptions ( like no data found etc ) and should continue processing without break or exit of the program .

    can you please give me a sample pl/sql program that will take care of this requirement .

    thanks/mike

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Code:
    begin
    for pnt in (select col1,col2,col3 from my_table) loop
      begin
        ..process the record
      exception
      when others then
        .. log the error
      end;
      end loop;
      commit;
    end;
    /
    please be aware while when others is not normally a good idea, this will capture ANY error so you can log it.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •