How can we help you today? How can we help you today?

Insert Into @table with Identity Column

Hello,

SQL Prompt (at least 7.1.0.44) does not recognize an Identity column in a declared table when using "Insert Into".
Declare @WorkContestNew table
    (
      Id int Identity
             Primary Key,
      NewContestId int Not Null
    )

-- Insert Into gives me this...
Insert  Into @WorkContestNew
        ( Id, NewContestId )
Values  ( 0, -- Id - int
          0  -- NewContestId - int
          )

-- When I expect this...
Insert  Into @WorkContestNew
        ( NewContestId )
Values  ( 0  -- NewContestId - int
          )
JimF
0

Comments

3 comments

  • Aaron L
    Thanks Jim, I see the same behavior here and we'll look into improving it for the next beta release :) (which should be next week - I'll let you know when it's up)
    Aaron L
    0
  • JimF
    Thanks Aaron. By the way, this also applies to the OUTPUT clause too.
    JimF
    0
  • Aaron L
    Hi Jim,

    This should now be fixed in the latest beta (7.1.0.188), please let us know if you have any issues on the latest build.

    Thanks,
    Aaron.
    Aaron L
    0

Add comment

Please sign in to leave a comment.