Home Dashboard Directory Help
Search

Server Management Studio intellisense does not remember temp tables by Scott R. Chamberlain


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 788513
Opened: 5/23/2013 9:28:10 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When you do a "select * into" in to a temp table then change databases using a "use" command intellisense will no longer recognizes the temp table.

Image Example: http://i.stack.imgur.com/ErUAp.png

If you create the table table via a "create table" query the temp tables will follow database changes.

This happens with both Management Studio 2008 and 2012 and with SQL databases 2008, 2008 R2, and 2012.


Here is a easy to to test set of queries to reproduce, you must be connected to a sql server that supports intelisense (2008 and up)

    use [master]
    select * into #foo from sys.tables
    create table #bar (baz int)
    
    select name from #foo
    select baz from #bar
    
    use [tempdb]
    select name from #foo
    select baz from #bar
Details
Sign in to post a comment.
Posted by Microsoft on 6/17/2013 at 12:22 PM
Hello Scott. We’ve looked into this item. While it will not be addressed in the current release cycle, we have added it to a list for consideration for the next. Thank you for the feedback. We will keep track of the suggestion.

-Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Posted by Microsoft on 5/24/2013 at 9:07 AM
Hello Scott. Thank you for bringing this to our attention. We really do appreciate the feedback. We’ll investigate and get back to you. -Walter A Jokiel, Program Manager, SQL Server (wajokiel@microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
Capture.PNG 5/23/2013 11 KB