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