______________________________________ CREATE PROCEDURE UPL_JC IS CURSOR C1 IS
SELECT EMPLID ,P_UPL_START ,P_UPL_TAKE FROM PS_P_UPL_CALC_L_JC; V_EMPLID VARCHAR(10); V_P_UPL_START DATE; V_P_UPL_TAKE NUMBER; V_UPL_DATE DATE; BEGIN OPEN C1; LOOP FETCH C1 INTO V_EMPLID ,V_P_UPL_START ,V_P_UPL_TAKE; BEGIN WHILE V_P_UPL_TAKE > 0 LOOP INSERT INTO PS_P_UPL_START_JC(EMPLID , P_UPL_START) VALUES(V_EMPLID , V_UPL_DATE); V_UPL_DATE:= V_P_UPL_START+V_P_UPL_TAKE; V_P_UPL_TAKE:= V_P_UPL_TAKE - 1; END LOOP; COMMIT; END; END LOOP; CLOSE C1; END; *Data in PS_P_UPL_CALC_L_JC* ______________________________________________ EMPLID P_UPL_START P_UPL_TAKE 00998 01.01.2008 00:00:00 59 07243 22.10.2008 00:00:00 1 07661 17.03.2008 00:00:00 198 ______________________________________________ Select * from PS_P_UPL_CALC_L_JC ______________________________________________ I'm having infinite loop on this PL/SQL, suspect is cause right here " BEGIN OPEN C1; LOOP " --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en -~----------~----~----~----~------~----~------~--~---