DBCC CHECKIDENT Format Document Error

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
jthorn
Posts: 1
Joined: Tue 05 May 2020 14:36

DBCC CHECKIDENT Format Document Error

Post by jthorn » Tue 05 May 2020 15:00

With SQL Complete (Standard Edition 6.4.28) in SSMS 2019 (v17.8.1), when I try to do a format document on a script with DBCC CHECKIDENT in it, I get the popup error that tells me there is a syntax error and to see the Output window for details. There is no helpful information in the Output window. Experimenting with different forms of the command, I was able to get it to work if I use the table name wrapped in brackets [], and pass an integer for the reseed value. But if I use the table name in single quotes, or use a variable for the reseed value, I get the syntax error warning when formatting the document. Here is a test script. The first version works, but the other 3 fail, although all 4 are syntactically correct.

Code: Select all

DECLARE @Id INT = 1
DBCC CHECKIDENT ([jha.DimTellerInstitution], RESEED, 1)     --Works

DBCC CHECKIDENT ([jha.DimTellerInstitution], RESEED, @Id)   --Fails
DBCC CHECKIDENT ('[jha].DimTellerInstitution', RESEED, 1)   --Fails
DBCC CHECKIDENT ('[jha].DimTellerInstitution', RESEED, @Id) --Fails

alexa

Re: DBCC CHECKIDENT Format Document Error

Post by alexa » Tue 05 May 2020 16:31

We will fix this issue in one of the next product builds and will notify you once it's available for downloading.

Post Reply