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.
Read more
Read more