Incorrect syntax near '^' when trying to apply changes to my local using source control

saulcruzsaulcruz Posts: 19 Bronze 1
edited February 1, 2018 7:53PM in SQL Source Control
My database has a few indexes with the following naming convention [in_name^key_id], I can manually create these indexes of course using the [ ], however SQL Source control is unable to do this when applying changes, by looking at the script it seems that the ALTER INDEX does not include the square brackets [ ] hence the syntax fails because of the ^ , in other words
This fails:
ALTER INDEX in_nameKey^Name2Key ON [dbo].[TableName] DISABLE
GO

Vs.

This works:
ALTER INDEX [in_nameKey^Name2Key] ON [dbo].[TableName] DISABLE
GO

Is there anyway SQL Source Control can automate this? or any ideas of how to workaround this without manually editing the script
Tagged:

Answers

Sign In or Register to comment.