microsoft/mssql-scripter

Index scripting INCLUDE columns contain spaces and tab

pamanes opened this issue · 0 comments

hi,

here's an example of how generate scripts wizard in SSMS scripts an index:

CREATE NONCLUSTERED INDEX [IX] ON [dbo].[Table]
(
[Account] ASC
)
INCLUDE([Col1],[Col2],[Col3]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

and here's how this tool generates it:

CREATE NONCLUSTERED INDEX [IX] ON [dbo].[Table]
(
[Account] ASC
)
INCLUDE ( [Col1],
[Col2],
[Col3]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

As you can see there's some weird spacing / tabs being added to the columns in the INCLUDE, is there a way to disable or prevent this?

thanks