SQL Server Forums - Loop through table - SQL Server Information at SQLTeam.com
Here is how you can loop through a table, although there is probably a good chance that you can write your query without any looping at all. But here you go: http://www.sqloptimizationsschool.com/Pages/Advanced%20Concepts/Loops%20vs.%20Cursors.aspx...