When i am trying to loop through cursor using a not found continue handler I am facing a problem, for a select staement inside cursor loop the not found condition is getting true and hence the cursor loop is also getting completed
Code:
DECLARE CONTINUE HANDLER FOR NOT FOUND
SET at_end=1;
OPEN C1;
FETCH C1 INTO perm;
WHILE at_end = 0 DO
<some select statement which returns null some time>
<when null is returned the continue handler set at_end=1>.. :(
FETCH C1 INTO perm
END WHILE;
CLOSE C1;