Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> NO_DATA_FOUND exception
Basically the issue is this:
When I call CheckAuthor('invalid_name', 'valid_address') a NO_DATA_FOUND exception is raised. Fair enough, no row is returned by the select statement. But when I call CheckAuthor('valid_author', 'invalid_address'), no exception is raised at all even though, like in the first example, no row is returned.
Why on earth is this?
CREATE OR REPLACE FUNCTION CheckAuthor
(author IN People.Name%TYPE,
address IN People.Address%TYPE)
RETURN BOOLEAN
IS
v_author People.Name%TYPE; v_address People.Address%TYPE;
DBMS_OUTPUT.PUT_LINE ('EXCEPTION RAISED?'); RETURN FALSE;
create table People (
PersonID INT PRIMARY KEY,
name varchar2(15),
address varchar2(15),
UNIQUE (name, Address)
);
create table Authors (
AuthorID INT UNIQUE REFERENCES People(PersonID),
Published INT DEFAULT 0,
UnderReview INT DEFAULT 0
);
Received on Sat Sep 13 2003 - 06:52:10 CDT