Tom Moreau creates an elegant solution using table variables; he also shows you how to create what amounts to an index on a table variable.
SQL Server Professional: Dr. Tom's Workshop: How Table Variables Can Speed Up Your Queries
SQL Server Professional: Dr. Tom's Workshop: How Table Variables Can Speed Up Your Queries