Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating temporary table
Message
From
04/02/2014 14:46:26
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01593184
Message ID:
01593206
Views:
29
>I believe this is correct if that SQLExec creates a new session. Most likely it does. However, if you find this not to be the case, then just add DROP #Temp at the end of the batch to execute. I normally don't drop temp tables in my code and don't remember running into problems.

This is awesome. I have cut another half a second here as I can rely directly from a temporary table, sent in one command, no need to negotiate with a long WHERE IN clause. This is also working very well at SQL Server. I can see that nothing more gets created once each hit is done. So, it seems that each call to execute a command cleans itself after in regards to the temporary table. The only ones that remained in there were those that got created from a query window. I also found that from a query window, for as long as it is opened, the name of the file is something like dbo.#7C66E722____________ and when it is closed, only the first part remains.

>SQL Server handles it itself, so you can re-use the same name.

This is what I found as well.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform