Sunday, February 19, 2012

commit after 10000 rows

Hi
I need to update a vary large amount of records (3 million). I don't want to wait till the end of the update to commit.
do you know how can I commit the transaction after, lets say 10000 rows, and then continue to the next 10000... and so on ?
I think it's one of the SET commands but I can't remember it.set rowcount 10000

while (still have records to be updated)
begin
update records
end

set rowcount 0

Originally posted by aig
Hi
I need to update a vary large amount of records (3 million). I don't want to wait till the end of the update to commit.
do you know how can I commit the transaction after, lets say 10000 rows, and then continue to the next 10000... and so on ?
I think it's one of the SET commands but I can't remember it.

No comments:

Post a Comment