RE: Update Query

RE: Update Query

 

  

please use this and confirm whether it works

DECLARE
CURSOR c_cur
IS
SELECT *
FROM emp;

l_count NUMBER := 0;
BEGIN
FOR c_rec IN c_cur
LOOP
l_count := c_cur%ROWCOUNT;
dbms_output.put_line(l_count);
IF MOD (l_count, 10000) = 0
THEN
COMMIT;
ELSE
NULL;
END IF;
END LOOP;
END;


Thanks and Regards
Deepak khosla



-----Original Message-----
From: Shailendra
[mailto:oracledba-ezmlmshield-x98446434.[Email address protected]
Sent: Wednesday, September 06, 2006 1:08 PM
To: LazyDBA Discussion
Subject: Update Query



Hi All Gurus,

I need your expertise in this regard. I got a table which contains
millions or
records. I want to update and commit every time for so many records ( say

10,000 records). I don't want to do in one stroke as I may end up in
Rollback
segment issue(s). Any suggestions please ! ! !

Thanks in Advance Waiting for Reply

Regard's


Shailendra Nigam





---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



Oracle LazyDBA home page