C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » General »

Schedular Forloop


Posted Date: 29 Aug 2008      Posted By: Nagamalleswari      Member Level: Silver     Points: 1   Responses: 1



Hi all,
I am developing one scheduler i need schedular

begin
dbms_scheduler.create_job
(
job_name => 'n4',
job_type => 'PLSQL_BLOCK',
for i in 1..3 loop
job_action => 'Insert into for2 Select id,name,i from for1;',
end loop;
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=secondly; interval=15',
enabled => TRUE,
comments => 'V soft'
);
end;

Error :
-----


for i in 1..3 loop
*
ERROR at line 6:
ORA-06550: line 6, column 3:
PLS-00103: Encountered the symbol "FOR" when expecting one of the following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively
ORA-06550: line 7, column 15:
PLS-00103: Encountered the symbol ">" when expecting one of the following:
:= . ( @ % ;


i need 3 times of schedular action

Please any one help me

Thanks,
Malleswari.





Responses

Author: D.Jeya kumar(JK)    29 Aug 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 4

Hi,


Try the for loop like this



begin
dbms_scheduler.create_job
(
job_name => 'n4',
job_type => 'PLSQL_BLOCK',
for i in 0..2 loop
job_action => 'Insert into for2 Select id,name,i from for1;',
end loop;
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=secondly; interval=15',
enabled => TRUE,
comments => 'V soft'
);
end;





Regards
JK



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : plz tell
Previous : oracle stored procedure
Return to Discussion Forum
Post New Message
Category: General

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use