• If streetranges is actually the result of the first query, you could try a CTE (common table expression - look it up in Books Online) to create and then use it . Or a temp table if you're on an earlier version of sql server.