Efficient Temporary Storage in SQL: Ditching Cursors for Table Variables
(A Limited-Scope Solution to Replace SQL Cursors)  Using a table variable is an excellent alternative...
Tags: sql, sqlserver