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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL with select into returning no rows

Re: PL/SQL with select into returning no rows

From: Ricardo Rocha <rrocha_at_usagate.net>
Date: 1997/03/16
Message-ID: <01bc31d7$56fea570$6464c7d0@rrocha>#1/1

If I correctly understood your problem, I'd suggest to try catching the NO_DATA_FOUND exception, as in:

...

-- Some stuff

BEGIN

	SELECT	ename
	INTO		my_ename
	FROM		emp
	WHERE	empno = my_empno;
EXCEPTION
	WHEN NO_DATA_FOUND THEN
		my_ename := NULL; -- Unkown name, ok to continue
END; Received on Sun Mar 16 1997 - 00:00:00 CST

Original text of this message

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