RaiseAppERR-3

RaiseAppERR-3 - CREATE OR REPLACE PROCEDURE raise_demo (...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 --RAISE_APPLICATION_ERROR CREATE OR REPLACE PROCEDURE raise_app_error ( inval NUMBER) IS evenno EXCEPTION oddno EXCEPTION BEGIN IF MOD(inval, 2) = 1 THEN RAISE oddno ELSE RAISE evenno END IF EXCEPTION WHEN evenno THEN RAISE_APPLICATION_ERROR(-20001, 'Even Number Entered') WHEN oddno THEN RAISE_APPLICATION_ERROR(-20999, 'Odd Number Entered') END raise_app_error / _________________________________________________________________-
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CREATE OR REPLACE PROCEDURE raise_demo ( inval NUMBER) IS evenno EXCEPTION oddno EXCEPTION BEGIN IF MOD(inval, 2) = 1 THEN RAISE oddno ELSE RAISE evenno END IF EXCEPTION WHEN evenno THEN dbms_output.put_line(TO_CHAR(inval) || ' is an even number') WHEN oddno THEN dbms_output.put_line(TO_CHAR(inval) || ' is an odd number') END raise_demo Sheet1 Page 2 /...
View Full Document

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 2

RaiseAppERR-3 - CREATE OR REPLACE PROCEDURE raise_demo (...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online