Oracle Exception Handling
Posted: Tue Jul 13, 2004 3:24 pm
I am eager to know, is there any way to handle exceptions raised by any SQL statement. For example.
I am reading a file and inserting into ORACLE Table. I have used INSERT ROWS WITHOUT CLEARING. Now I want to trap the error due to UNIQUE CONSTRAINT Voilation. IN this case I want to go ahead and continue with next record. If there is any other problem like data type mismatch or variable overflow or any error with database (like WHEN OTHERS), I want to terminate the job. Is there any mechanism to handle this programattical situtaion. Any help on this will be highly appreciated.
Thanks,
Gulshan
I am reading a file and inserting into ORACLE Table. I have used INSERT ROWS WITHOUT CLEARING. Now I want to trap the error due to UNIQUE CONSTRAINT Voilation. IN this case I want to go ahead and continue with next record. If there is any other problem like data type mismatch or variable overflow or any error with database (like WHEN OTHERS), I want to terminate the job. Is there any mechanism to handle this programattical situtaion. Any help on this will be highly appreciated.
Thanks,
Gulshan