none
SSMS IntelliSense doesn’t not recognize local temporary table

    질문

  • 
    
    
    
    

    I'm using SSMS 2008 R2 and honestly, this is so irritating that IntelliSense doesn't work on local temporary table.

    Here is a simple example:

    if object_id('tempdb..#MyLocalTmpTable') is not null
    drop table 	MyLocalTmpTable
    create table dbo.#MyLocalTmpTable
    (
    	CustumerId	uniqueidentifier,
    	Name		varchar(250) null,
    	Surname		varchar(250) null,
    	Email		varchar(500) null
    )
    
    delete dbo.#MyLocalTmpTable
    

    As you can see in the picture below, #MyLocalTmpTable isn’t recognized and the auto-completion won’t work.

    But what is even less understandable is that this is working for temporary table????

    declare @MyTmpTable as table
    (
    	CustumerId	uniqueidentifier,
    	Name		varchar(250) null,
    	Surname		varchar(250) null,
    	Email		varchar(500) null
    )
    
    delete @MyTmpTable
    

    Here I’ve got my list member working.

    Anyone knows how to set SSMS 2008 in order to detect local tmp tables?

    PS: Please don’t suggest to refresh local cache, I’ve already done it several dozens times and it doesn’t work.

    Thank you,


    2012년 7월 3일 화요일 오전 11:21

답변

  • Hi,

    Is there a any specific reason toy are mentioning DBO schema while dropping?

    If I remove the DBO., its is able to detect the temp table as well. See if this works for you.


    - Chintak (My Blog)

    2012년 7월 3일 화요일 오전 11:30

모든 응답

  • Hi,

    Is there a any specific reason toy are mentioning DBO schema while dropping?

    If I remove the DBO., its is able to detect the temp table as well. See if this works for you.


    - Chintak (My Blog)

    2012년 7월 3일 화요일 오전 11:30
  • 

    
    Sometimes I can feel totally stupid :) You’re right Chintak, removing dbo fix the problem. Thank you very much! Tough I was sure having tried to remove dbo before and it wasn’t working… Maybe I did it wrong.Problem solved!
    2012년 7월 3일 화요일 오후 1:12
  • Hi,

    Is there a any specific reason toy are mentioning DBO schema while dropping?

    If I remove the DBO., its is able to detect the temp table as well. See if this works for you.


    - Chintak (My Blog)


    2012년 7월 4일 수요일 오전 7:19