Skip to content

Commit 28e8ba0

Browse files
committed
sp_BlitzCache tweaks to Unicode string building
1 parent db4803e commit 28e8ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sp_BlitzCache.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,8 +1918,8 @@ IF @MinutesBack IS NOT NULL
19181918
IF @SlowlySearchPlansFor IS NOT NULL
19191919
BEGIN
19201920
RAISERROR(N'Setting string search for @SlowlySearchPlansFor, so remember, this is gonna be slow', 0, 1) WITH NOWAIT;
1921-
SET @SlowlySearchPlansFor = REPLACE((REPLACE((REPLACE((REPLACE((@SlowlySearchPlansFor), N'[', N'_')), N']', N'_')), N'^', N'_')), N'''', N'''''');
1922-
SET @body_where += N' AND CAST(qp.query_plan AS NVARCHAR(MAX)) LIKE ''%' + @SlowlySearchPlansFor + '%'' ' + @nl;
1921+
SET @SlowlySearchPlansFor = REPLACE((REPLACE((REPLACE((REPLACE(@SlowlySearchPlansFor, N'[', N'_')), N']', N'_')), N'^', N'_')), N'''', N'''''');
1922+
SET @body_where += N' AND CAST(qp.query_plan AS NVARCHAR(MAX)) LIKE N''%' + @SlowlySearchPlansFor + N'%'' ' + @nl;
19231923
END
19241924

19251925

0 commit comments

Comments
 (0)