plsql exception

EXCEPTION aligns with BEGIN ... END blocks. There is no BEGIN inside your loop, so there should be no exception either.

It seems the purpose of the exception is to suppress NO_DATA_FOUND errors inside the loop. So to fix this error you need to put a BEGIN / END block in the loop too. (Ah, you have an END just no BEGIN - your code would hurl with the EXCEPTION block).

FOR indx IN 1 .. arr.COUNT LOOP BEGIN SELECT COUNT(*), ca.cities INTO tmp_count, affected_cities FROM PDB.utilities ca .... EXCEPTION WHEN NO_DATA_FOUND THEN CONTINUE; END; END LOOP;

猜你喜欢

转载自www.cnblogs.com/kakaisgood/p/11544043.html