If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hi everyone,
I've a stored procedure which have a
EXCEPTION WHEN NO_DATA_FOUND THEN code in it, but it seems like the EXCEPTION is not working as the msg I put doesn't display at all... here is the code:

There is no exception to be raised! When your explict cursor returns no rows you handle this with "EXIT WHEN ..." inside your fetch loop, so there realy is no unhandled exception in your case. If you want to display a message when there is no records returned you should use cursor's ROWCOUNT pseudocolumn outside your loop before you close your cursor:

OPEN InventoryCursor;
LOOP
FETCH InventoryCursor INTO InventoryRow;
EXIT WHEN InventoryCursor%NOTFOUND;
-- ..... other stuff here
END LOOP;
IF InventoryCursor%ROWCOUNT = 0 THEN ....;
END IF;
CLOSE InventoryCursor;
....

Jurij ModicASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?