Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> raise_application_error

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: raise_application_error
 deva  Posted: Jan 16, 2008 01:09:47 AM

 Total Post: 4
 Joined: Jan, 2008






 raise_application_error terminate the procedure or continue from the next statement.

 Babu
Posted: Jan 16, 2008 04:04:16 AM  

 Total Post: 94
 Joined: Oct, 2007






 

It's not terminating.

 Nehru
Posted: Jan 17, 2008 12:05:47 AM  

 Total Post: 46
 Joined: Jul, 2007






 
HI,

RAISE_APPLICATION_ERROR will terminate the procedure execution.

see the sample procedure here try this:

CREATE OR REPLACE PROCEDURE RAISEAPPERR
AS
VNAME VARCHAR2(30);
BEGIN
SELECT ENAME INTO VNAME FROM EMP WHERE EMPNO = 7839;

IF VNAME = 'KING' THEN
RAISE_APPLICATION_ERROR(-20036,'INVALID STATEMENT');
END IF;

SELECT ENAME INTO VNAME FROM EMP WHERE EMPNO = 7369;
DBMS_OUTPUT.PUT_LINE(VNAME);

END;
/
Once the RAISE_APPLICATION_ERROR fire then the procedure terminates.

Any one let me know if am wrong.

Take Care.

Thanks,
Nehru.

 shwetamber
Posted: Jan 18, 2008 06:12:54 AM  

 Total Post: 2
 Joined: Sep, 2005






 
well

raise_application_error will not terminate the procedure.
to some extent it acts as RAISE exception_name.
As any of the two statements written above are encountered,an exception is raised. the advantage with raise statement is we can have an exception handler for exception_name. but when when an exception is raised using raise_application_error it can only be catered by when others handler.

 Garlapati
Posted: Feb 04, 2008 06:11:44 AM  

 Total Post: 30
 Joined: Apr, 2007






 
yes Raise_application_error will terminate the procedure execution


 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi335
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software