Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with continue statement

663394Oct 7 2008 — edited Oct 7 2008
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'
This post has been answered by 21205 on Oct 7 2008
Jump to Answer

Comments

BluShadow
Maybe a quick search on the internet has the answer...

http://dba.ipbhost.com/index.php?showtopic=8736
21205
Answer
It's probably a problem with your tool. Assuming you're on Oracle 11gR1, run the script in SQL*Plus and it will work.
Marked as Answer by 663394 · Sep 27 2020
SomeoneElse
The CONTINUE statement is a new feature of 11g.

You didn't tell us what version you are using.
663394
Thanks I actaully stumbled on that site after posting the question.Any way as 'someone else' pointed continue is not supported in my version (10 g). Thanks a lot everyone for your time.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 4 2008
Added on Oct 7 2008
4 comments
258 views