Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating temporary table
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01593184
Message ID:
01593233
Views:
37
>>It doesn't have to be a temp table, it can be a CTE, e.g.
>>
>>;with cte as (select Numero from .. where ..)
>>
>>select ... JOIN cte ...
>>
>>
>>
>>You may want to try that approach as well. I'll check the execution plan screen later, currently trying to figure out weird VFP problem with debugging code.
>
>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.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform