4
tryst
8y

Having to write a triple nested cursor with identity in Sql.

Comments
  • 0
    Cursors are the work of the devil, can't you do it with a while loop so that it doesn't cause a table lock ?
  • 0
    @bluescreen it had while loops for each cursor.
  • 0
    @bluescreen It also only runs a minute, two minutes max. So minimum table lock.
  • 0
    @tryst I have was thinking the removal of the cursor entirely and replace with a while, I've used that approach before with success. We used to have. Mantra "if you have to use cursor it had better be a life or death situation" at my previous job. Always used other method to achieve the same goal
Add Comment