>>I was thinking the same thing, either a cte or a sub-query (select from.. where numero in (select numero...from .... join...)), i do not see the need of a temp table (although internally SQL is just doing that, right?)
>
>I don't think internally SQL Server will create a temp table in case of cte. I think in this case it will be in memory. But it's a complex problem and I may need to re-read a few articles on this topic to be absolutely sure.
Hi, I started a new thread....Message #
1593237