Top "Temp-tables" questions

Temporary tables are a feature of RDBMS's as a means of storing intermediate results.

How to insert into an existing temp table in SQL Server

I am trying to execute two select statements into a query that pumps data into a temp table. The first …

sql sql-server temp-tables
What are the Main difference between CTE's and TEMP tables?

Is there a benefit to using CTE's (common table expressions) instead of using temp tables. I went through performance testing …

sql tsql sql-server-2008-r2 common-table-expression temp-tables
SQL Server SELECT INTO and Blocking With Temp Tables

So, recently a DBA is trying to tell us that we cannot use the syntax of SELECT X, Y, Z …

sql-server stored-procedures temp-tables sqlperformance
Is it possible to have temp tables in a function?

Apparently, I can't use them. I'm getting an error message like: Invalid use of a side-effecting operator 'SELECT' within a …

sql sql-server tsql function temp-tables
Update from Temp Table

Query: SELECT ID, T.c.value('@Address', 'nvarchar(20)' ) as Address INTO #TMP FROM TABLE1 CROSS APPLY XMLData.nodes(…

sql sql-server tsql sql-update temp-tables
SQL Server shows "Invalid object name '#temp'" when working with a temporary table

I have created a procedure create procedure testProcedure_One as DECLARE @Query nvarchar(4000) begin SET @Query = 'SELECT * into #temptest FROM …

sql-server sql-server-2005 temp-tables
EF4 - The selected stored procedure returns no columns

I have query in a stored procedure that calls some linked servers with some dynamic SQL. I understand that EF …

sql-server entity-framework-4 temp-tables
Deleting Global Temporary Tables (##tempTable) in SQL Server

Does SQL server automatically purge these out after a given length of inactivity or do I need to worry about …

sql-server temp-tables
There is already an object named '##Temp' in the database

I have a stored procedure on SQL Server 2000. It contains: select ... into ##Temp ... ... drop table ##Temp When I run the …

sql sql-server sql-server-2000 ado temp-tables
Using temporary table in c#

I read an excel sheet into a datagrid.From there , I have managed to read the grid's rows into a …

c# sql temp-tables