Home » SQL & PL/SQL » SQL & PL/SQL » Exception handling
Exception handling [message #191669] Thu, 07 September 2006 11:44 Go to next message
karenmh
Messages: 2
Registered: September 2006
Location: Norfolk
Junior Member
I hope you can help me.
I am familiar with creating a procedure which defines a cursor, opens that
cursor , then loops through the records in the cursor. If a record contains
bad data and will fail whichever function I am applying to it, it jumps to
the exception handler and I can catch it in a table. The loop then carries
on and processes the next record etc.
However I have been given a piece of code to modify which has no exception
handling routine. But it doesn't use a cursor- it processes the rows as a
set. If there is an bad data in one row the whole lot fails.
Is there anyway to find the dodgy row in a set short of re-writing all the
code to use the cursor syntax that I'm familiar with
Re: Exception handling [message #191787 is a reply to message #191669] Fri, 08 September 2006 02:45 Go to previous messageGo to next message
venkatbollu
Messages: 53
Registered: April 2005
Location: Bangalore
Member

Hi

I think you'll be looping through the set If I am correct, try this way..

For loop starts here
Begin

ur block of code here


exception
Handle the exception here
end;

end loop

Thks & Rgds
Venkat

[Updated on: Fri, 08 September 2006 02:50]

Report message to a moderator

Re: Exception handling [message #191851 is a reply to message #191669] Fri, 08 September 2006 06:42 Go to previous message
karenmh
Messages: 2
Registered: September 2006
Location: Norfolk
Junior Member
Thanks for your reply Venkat. Sounds like I will need to re-write this to use a cursor so I can loop through the set
Best wishes
Karen
Previous Topic: Trigger - tracing invoker
Next Topic: oracle 8i documentation.
Goto Forum:
  


Current Time: Sun Dec 04 00:40:30 CST 2016

Total time taken to generate the page: 0.07685 seconds