Try using Explain Plan or Show Plan to show how the optimizer plans on executing the queries. There's a good chance that your 2 queries (1 and 3 are...
I've been coding SQL in Sybase and Oracle more recently, but if you are using SQL Server 2000 or 2005, I believe you could use table variables to pass your...