It is obvious that a cursor is the pointer to the current row in the recordset. But mere pointing isn't gonna make sense unless it can be used. Here comes the Fetch statement into the scene. This takes data from the recordset, stores it in the variable(s) provided. so if you remove the first fetch statement the while loop won't work as there is not "FETCHED" record for manipulation, if you remove the last fetch statement, the "while" will not loop-through.

So it is necessary to have both the fetch statement to loop-through the complete recordset.

I totally agree with the stance on cursors. Sadly, I must allow some rows to fail without failing the entire update. I had my insert-into-select all done and then I had to resort to cursors to ignore failing conversions in my select. Ho hum.
–
Bernhard HofmannSep 4 '12 at 10:41

2

@BernhardHofmann Can you not pre-emptively catch the failures with a WHERE clause?
–
podiluskaSep 4 '12 at 10:48