Assaf,
If you are not comfortable with such an SP, I may be able to provide you a template of this SP ?( as Marcus said).
Let me know,
Quote:
|
Originally Posted by assafp76
2. Is there a way to do a commit every n record? (without a cursor)
Assaf
|
Well, I used a technique ( called chunking ) which is not for all situations. It was with additional sub-query having
FETCH FIRST 20000 ROWS ONLY -- and of course repeating it in a
for loop in batch file till all rows are done. This woks in some (few) situations. I used it once for update and once in delete. Few other situations it was not feasible because it was creating recursiveness.
I would say SP approach using
cursor with hold is most reliable method , especially in production database.
DBFinder