Skip to content

Commit 9862095

Browse files
AaronBertrandBrentOzar
authored andcommitted
Add END in the right spot for IF @Help = 1 (#2035)
The END for IF @Help = 1 was in the wrong place, making the procedure a no-op *unless* you also specify @Help = 1.
1 parent 1e6bee2 commit 9862095

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sp_ineachdb.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ IF @Help = 1
8787
8888
*/
8989
';
90+
91+
RETURN -1;
92+
END
9093

9194
DECLARE @exec nvarchar(150),
9295
@sx nvarchar(18) = N'.sys.sp_executesql',
@@ -265,5 +268,4 @@ IF @Help = 1
265268
CLOSE dbs;
266269
DEALLOCATE dbs;
267270
END
268-
END
269271
GO

0 commit comments

Comments
 (0)