From 794f2d9b548abb402f977f068698486f911b5f94 Mon Sep 17 00:00:00 2001 From: sm8680 Date: Wed, 16 Mar 2022 13:32:10 -0400 Subject: [PATCH] Update view_IndexCreation.sql Fixed a case sensitive issue on line 160 changed i.[ix_handle] to I.[ix_handle] --- Index-Creation/view_IndexCreation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Index-Creation/view_IndexCreation.sql b/Index-Creation/view_IndexCreation.sql index 481d265..8b2e7c0 100644 --- a/Index-Creation/view_IndexCreation.sql +++ b/Index-Creation/view_IndexCreation.sql @@ -157,7 +157,7 @@ INNER JOIN sys.dm_db_missing_index_group_stats s ON s.group_handle = g.index_gro WHERE i.database_id > 4 INSERT INTO #IndexRedundant -SELECT I.DBName, I.[Table], I.[Ix_Name], i.[ix_handle], I.[KeyCols], I.[IncludedCols], I2.[Ix_Name] +SELECT I.DBName, I.[Table], I.[Ix_Name], I.[ix_handle], I.[KeyCols], I.[IncludedCols], I2.[Ix_Name] FROM #IndexCreation I INNER JOIN #IndexCreation I2 ON I.[database_id] = I2.[database_id] AND I.[Table] = I2.[Table] AND I.[Ix_Name] <> I2.[Ix_Name] AND (((I.KeyColsOrdered <> I2.KeyColsOrdered OR I.[IncludedColsOrdered] <> I2.[IncludedColsOrdered])