Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    India
    Posts
    6

    Unanswered: Trapping Exception and Continue with Stored Procedure

    Hi

    I am inserting multiple Recrods at a time in a table using loop in stored procedure.

    I am Using 9i.

    Now i want is whenever while inserting if DUP_VAL_IN_INDEX exception occurs
    then i want loop should continue with next record for insertion.

    Thanx

    Avi

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    declare

    v_error number;

    begin
    ....
    loop
    exit when ... cursor%notfound;
    ...
    begin
    insert into ...

    exception when dup_val_on_index then
    v_error := 1;
    end;
    fetch ....
    end loop;


    HTH
    Gregg

  3. #3
    Join Date
    Aug 2002
    Location
    India
    Posts
    6
    Thanks gbrabham

    Avi

Posting Permissions

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