I am executing the below scrip " select * from ##tablename" getting error as :-Invalid object. How can i access this temporary table
(comments are locked)
|
A double # table is a global temporary table, and will cease to exists when all connections have stopped referencing it and the session that created the table has ended. If you try to access the table outside of these conditions, it will no longer exist. i am accessing in same connection.
Nov 28, 2011 at 03:11 AM
jhunu
can you post the script?
Nov 28, 2011 at 03:21 AM
Kev Riley ♦♦
(comments are locked)
|
Check the existence of your global temp table using below query. SELECT * FROM tempdb..sysobjects where name like '%tablename%' Better to use
Dec 13, 2011 at 01:15 PM
Pavel Pawlowski
(comments are locked)
|
i think there are two table, one is local temp table which we create like #table and another is ##Table which is global temp table concept. local will be accesible to you only while ## global to all user who are on server till the time session not end by creator. you can more search the topic on google.
Dec 13, 2011 at 03:35 AM
Sri 1
(comments are locked)
|