Can you do a FOR EACH loop in T-Sql? Maybe in a stored procedure? | The ASP.NET Forums
Thanks James, helped me a lot. One thing to note, instead of doing SELECT in every iteration of loop, we can use something like DECLARE @RecordCount = (SELECT COUNT(idx) FROM tempTable) And then we can use @RecordCount in loop. This saves ......