Suggestions from Table Variables

MikeONeillMikeONeill Posts: 131
edited February 14, 2011 7:01AM in SQL Prompt Previous Versions
Hi

If I create a Table Variable , should I be seeing normal suggestion lists from the columns
eg

DECLARE @Test TABLE
(
Id INT ,
TestName VARCHAR(50)
)



if that were Select * from <space> I would get the whole Table suggestion list , in the case of a Table Vaiable I get Nothing, adding the @ still nothing

I need to do a Cnt Space to show the Suggestions , then it pops to my @Test table as I would expect

Same goes for Insert Into , you need to go the Ctr Space route

Am I missing a setting ?

Or is this not supported

Mike

Comments

  • PS

    It seems to work normally if

    CREATE TABLE #Test
    (
    Id INT ,
    TestName VARCHAR(50)
    )

    SELECT
    Id ,
    TestName
    FROM
    #Test AS t

    Mike
  • It workes fine when I use table variables.
  • Hi,

    I've had a play with this and it seems that if you type quickly -- so that you've typed the @ before the table names suggestions box appears -- then indeed you have to press ctrl-space to force the box to pop up.

    When I pause after typing FROM, the Suggestions box appears with the full list of table names. When I then type an @, the list is filtered to @Test as you'd expect.

    This behaviour doesn't seem to happen when table names begin with a letter, so it does look like a (pretty minor) bug.

    Regards,
    Paul
    Paul Stephenson
    Project Manager, Red Gate
Sign In or Register to comment.