Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NO_DATA_FOUND exception
"Noons" <wizofoz2k_at_yahoo.com.au> wrote in message
news:3f632c9e$0$13416$afc38c87_at_news.optusnet.com.au...
> Try this:
>
> > BEGIN
> begin
> > SELECT People.Name, People.Address
> > INTO v_author, v_address
> > FROM People, Authors
> > WHERE People.PersonID = Authors.AuthorID
> > AND address = People.Address
> > AND author = People.Name;
> EXCEPTION
> > WHEN NO_DATA_FOUND THEN
> > DBMS_OUTPUT.PUT_LINE ('EXCEPTION RAISED?');
> > RETURN FALSE;
> end;
> RETURN (v_author = author AND v_address = address);
> > END;
> > /
>
> You're just not accepting exceptions in the right spot.
>
Thanks for that, Nuno but I've now discovered why this was screwing up.
Once I changed the parameter 'address IN People.Address%TYPE' from 'address' to 'suburb' it was fine - it appears that you should avoid giving your parameters the same name as the columns you address in a select statement, I didn't realise this was going to be a problem. Received on Sat Sep 13 2003 - 10:23:18 CDT