Reputation: 1726
Is there a way to tell a program to move to the next iteration of a while loop in SQL-PL for DB2? I know that there is a CONTINUE statement, but it isn't working for me.
I basically want:
WHILE .... DO
IF condition_met THEN
-- Move to next iteration of the while loop
END IF;
END WHILE;
Upvotes: 0
Views: 790
Reputation: 278
Look at the ITERATE command in the Knowledge Center. The ITERATE statement causes the flow of control to return to the beginning of a labelled loop.
Upvotes: 1