Forum Stats

  • 3,839,616 Users
  • 2,262,514 Discussions
  • 7,901,018 Comments

Discussions

Help with continue statement

663394
663394 Member Posts: 3
edited Oct 7, 2008 3:33PM in SQL & PL/SQL
I am facing problem using the continue statement, here is a mock-up

-----
DECLARE
x NUMBER := 0;
BEGIN
LOOP -- After CONTINUE statement, control resumes here
DBMS_OUTPUT.PUT_LINE ('Inside loop: x = ' || TO_CHAR(x));
x := x + 1;

IF x < 3 THEN
CONTINUE;
END IF;

DBMS_OUTPUT.PUT_LINE
('Inside loop, after CONTINUE: x = ' || TO_CHAR(x));

EXIT WHEN x = 5;
END LOOP;

DBMS_OUTPUT.PUT_LINE (' After loop: x = ' || TO_CHAR(x));
END;
-----
when I execute this in in Quest script runner, I get an error message saying 'Identifier CONTINUE must be declared'
Tagged:

Best Answer

Answers

This discussion has been closed.