Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursors
Message
 
 
To
17/06/2011 11:07:33
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01514874
Message ID:
01514898
Views:
52
>>>Thanks
>>
>>Until the connection closes that created it or until you explicitly drop it with DROP command. (Or, of course, if SQL Server is re-started and TempDB re-created).
>
>Ok
>
>I'm running a stored procedure in management studio selecting data into #new_member_list
>If I then try to select from #new_member_list I get Invalid object name '#new_member_list'.
>
>I know my stored proedure is selecting data as if I select into a table I get results.
>
>So what do you think I might be getting wrong.
>
>Thanks

If you created a temp table in SP, you can not access this temp table outside the SP. If you want to access it from outside, you need to create it before calling this SP, then this table will be visible in the SP and you can populate it there.

I suggest to also read this excellent article
How to share data between stored procedures
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