Skip to content

Commit fe645e7

Browse files
authored
Add missing drop if exists statements for temp tables
Added drop if exists statements for two temp tables in order to make the contents of sp_blitzindex easier to run ad-hoc.
1 parent 87880bb commit fe645e7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sp_BlitzIndex.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,6 +2591,7 @@ SELECT
25912591
FROM #IndexSanity;
25922592

25932593
RAISERROR (N'Populate #PartitionCompressionInfo.',0,1) WITH NOWAIT;
2594+
IF OBJECT_ID('tempdb..#maps') IS NOT NULL DROP TABLE #maps;
25942595
WITH maps
25952596
AS
25962597
(
@@ -2605,6 +2606,7 @@ SELECT *
26052606
INTO #maps
26062607
FROM maps;
26072608

2609+
IF OBJECT_ID('tempdb..#grps') IS NOT NULL DROP TABLE #grps;
26082610
WITH grps
26092611
AS
26102612
(

0 commit comments

Comments
 (0)