Home » SQL & PL/SQL » SQL & PL/SQL » Exception problem (merged)
Exception problem (merged) [message #210898] Sat, 23 December 2006 00:49 Go to next message
sridharbireddy
Messages: 25
Registered: September 2006
Junior Member
HI

I create one procedure for retrieving data from emp table by using deptno, I create one for loop and print the date. suppose at 50th deparment number there is no data, Oracle Implicitly rise the exception and I handle that exception.
what I want is after Handle the exception, controller go back and print the data of reaming deptno.
any body tell the what I suppose to do..
exception Problem [message #210900 is a reply to message #210898] Sat, 23 December 2006 01:01 Go to previous messageGo to next message
sridharbireddy
Messages: 25
Registered: September 2006
Junior Member
HI,
Rise statement Itself is valid Statement? where I write this statement. suppose I write statement like this it work?.where the controller move.

create procedure ch_sal is
begin
begin
statement1;
...... ;

Exception
when exception_name Then
Raise;
End;
begin
statements;
exception
when exception_name then
statement1;
end;
end;
Re: exception Problem [message #210904 is a reply to message #210900] Sat, 23 December 2006 01:41 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Is it so hard to read the documentation?
It is possible to use
raise exception_name
instead of ...... in your code.
Re: exception Problem [message #210911 is a reply to message #210898] Sat, 23 December 2006 03:22 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create another BEGIN - EXCEPTION - END PL/SQL block within the FOR loop.
Re: exception Problem [message #210913 is a reply to message #210911] Sat, 23 December 2006 03:42 Go to previous message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
@sridharbireddy

I merged your two topics about the same problem: exception handling. Please, do not open new topics, but continue discussion in original one. Now the first 4 posts seem to be mixed up, but I hope you'll manage to figure out which message answers which question.
Previous Topic: higest salary
Next Topic: Plz provide sol. for this Sql Query
Goto Forum:
  


Current Time: Sat Dec 03 10:19:59 CST 2016

Total time taken to generate the page: 0.06049 seconds