Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: NO_DATA_FOUND exception

Re: NO_DATA_FOUND exception

From: David <auto90059_at_hushmail.com>
Date: Sun, 14 Sep 2003 01:23:18 +1000
Message-ID: <3f633d80$0$10358$afc38c87@news.optusnet.com.au>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US