Hello everyone,
I have the following program:
DECLARE
v_start_date DATE;
v_end_date DATE;
BEGIN
v_begin_date := '&BEGIN_DATE';
v_end_date := '&END_DATE';
--If parameters entered are not NULL then start insert
IF (v_begin_date IS NOT NULL) AND (v_end_date IS NOT NULL)
THEN
--
INSERT INTO student
SELECT *
FROM student_temp
WHERE admission_dt BETWEEN v_begin_date AND v_end_date;
END;
--
/
Since I have millions of records in the student_temp table, I get the following error upon doing insert - ORA-1628: max # extents 5000 reached for rollback segment
Can you please assist me with the loop I need to use to loop through each month based on the start date (parameter) and commiting each time instead of inserting in one big chunk?
Thanks for any help you can provide...
Jacky
I have the following program:
DECLARE
v_start_date DATE;
v_end_date DATE;
BEGIN
v_begin_date := '&BEGIN_DATE';
v_end_date := '&END_DATE';
--If parameters entered are not NULL then start insert
IF (v_begin_date IS NOT NULL) AND (v_end_date IS NOT NULL)
THEN
--
INSERT INTO student
SELECT *
FROM student_temp
WHERE admission_dt BETWEEN v_begin_date AND v_end_date;
END;
--
/
Since I have millions of records in the student_temp table, I get the following error upon doing insert - ORA-1628: max # extents 5000 reached for rollback segment
Can you please assist me with the loop I need to use to loop through each month based on the start date (parameter) and commiting each time instead of inserting in one big chunk?
Thanks for any help you can provide...
Jacky