Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> stored proc vs plsql: question
I'm not so hot with the programming concepts, so does someone mind
explaining to me what I have to chnage in order to make thie following plsql
block into a stroed proc? I believe it's the DECLARE statement that is
wrong. I thought I could just add the following at the beginning: CREATE
OR REPLACE PROCEDURE runjobs_proc AS
DECLARE
jobnum dba_jobs.job%TYPE;
CURSOR c1 is
SELECT job from dba_jobs;
BEGIN
OPEN c1;
LOOP -- process each row one at a time FETCH c1 INTO jobnum; EXIT WHEN c1%NOTFOUND;
-- the c1%NOTFOUND condition evaluates
-- to TRUE when FETCH finds no more rows
/* run the job */ DBMS_JOB.RUN (jobnum);
![]() |
![]() |