TSQL – Loop Through Result Set WITHOUT Cursors benjf.com.blog@benjf.com, 2013-05-20 There is some controversy about using cursors in TSQL. Overall, I believe they tend to tie up resources and are seen as bad. So how do you get around using them? Here’s how. You can see how cursors are used in my post at TSQL – Simple Loop Through Result Set Using Cursor To NOT use cursors, you must create a temp table with a “flag” column to indicate whether or not it has been processed yet. Then, rather than updating the cursor, you update the flag column. Here’s an example: Programming Random Awesomeness SQL avoiding cursorshow to not use cursorslooptemp table in place of cursorTSQL