this is a great script. But it does not work if there are Included columns. Example my index looks like this:
CREATE UNIQUE INDEX IDX_indexName ON dbo.TableName
(
Column1
, Column2
)
INCLUDE
(
Column3
, Column4
, Column5
)
But your script creates it as follows:
CREATE UNIQUE INDEX IDX_indexName ON dbo.TableName
(
Column1
, Column2
, Column3
, Column4
, Column5
)
Any clues on how to modify your script to get what I need?
Thanks!