Yeah you are right.That's why I am doing it on a cloned table instead of the original one.After the procedure is succesful, I will run it on the original table.Quote:
Originally posted by DaPi
If I'm right about your business needs, you're deleting pairs of matching entries (transactions?):
1) The cursor "selects" 8mio rows including a pair +123 and -123
2) You loop & commmit several times, and by chance this deletes the row +123 & commits, by chance -123 hasn't be processed yet.
3) It crashes with a 1555
4) You restart. The cursor is re-evaluated and "selects" 7mio rows BUT DOES NOT INCLUDE -123 because this is not a paired entry any more; its matching entry no longer exists.
BINGO - your books don't balance
