Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NO_DATA_FOUND puzzlement

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
CA
Hi there,

I have code like the below inside a cursor FOR loop and when no data is found rather than being handled, I get ORACLE ERROR 1403! Eversince upgrading to 8i I've noticed this..

The code just terminates..

Does anyone know why?

BEGIN --B2
SELECT UPC_CLASS
INTO V_UPC_CLASS
FROM UPC_CD
WHERE UPC_CD = LTRIM(RTRIM(V_UPC));
EXCEPTION
WHEN NO_DATA_FOUND THEN
V_UPC_CLASS:=NULL;
WHEN TOO_MANY_ROWS THEN
V_UPC_CLASS:=NULL;
WHEN OTHERS THEN
V_UPC_CLASS:=NULL;

END;

Any help would be greatly appreciated!
 
I'd suggest you to look for the source of error outside this statement. No data found may also be raise by referencing non-existing row of PL/SQL table variable.

Regards, Dima
 
Perhaps some DBMS_OUTPUT.put_line statements in the EXCEPTION section would help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top