"continue" in pl/sql [message #361254] |
Tue, 25 November 2008 09:42  |
kanis
Messages: 61 Registered: November 2006
|
Member |
|
|
when trying to execute the below subprogram in oracle 10g
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;
It is giving an error
ORA-06550: line 9, column 11:
PLS-00201: identifier 'CONTINUE' must be declared
ORA-06550: line 9, column 11:
PL/SQL: Statement ignored
Is pl/sql in oracle 10g does not support continue? what to be done to resolve the error.?
|
|
|
Re: "continue" in pl/sql [message #361257 is a reply to message #361254] |
Tue, 25 November 2008 09:53   |
joicejohn
Messages: 327 Registered: March 2008 Location: India
|
Senior Member |
|
|
Kanis,
I am not sure about this. But I think the CONTINUE Statement was introduced in Oracle 11g
Oracle Documentation |
Many programming languages allow transfer of control either out of the loop entirely or within a loop back to a new iteration. In previous releases, PL/SQL only allowed transfer of control out of the loop using the EXIT statement. In Oracle Database 11g Release 1 (11.1), the new CONTINUE statement implements the ability to transfer control within a loop back to a new iteration.
|
Confirmed: Oracle Documentation
Regards,
Jo
[Updated on: Tue, 25 November 2008 09:57] Report message to a moderator
|
|
|
|
Re: "continue" in pl/sql [message #361267 is a reply to message #361254] |
Tue, 25 November 2008 10:30  |
 |
Michel Cadot
Messages: 68765 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
From your previous post:
Michel Cadot wrote on Sat, 18 October 2008 07:50 | ...
Before, please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format and indent the code.
Use the "Preview Message" button to verify.
Regards
Michel
|
|
|
|