Skip to content

Commit b0dd1fd

Browse files
BugFix DataBaseName NULL in #Results Temp Table
1 parent b259427 commit b0dd1fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Searching/sp_find.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Parameters:
5353
Results table Schema:
5454
--------------------
5555
CREATE TABLE #SearchResults(
56-
[DatabaseName] nvarchar(128) NOT NULL -- Database name of the match. In case of server scoped objects NULL
56+
[DatabaseName] nvarchar(128) NULL -- Database name of the match. In case of server scoped objects NULL
5757
,[MatchIn] varchar(10) NOT NULL -- Specifies whether match was in NAME or in definition
5858
,[ObjectType] nvarchar(66) NOT NULL -- Type of object found
5959
,[ObjectName] nvarchar(128) NULL -- Object name
@@ -157,7 +157,7 @@ IF OBJECT_ID('tempdb..#Results') IS NOT NULL
157157

158158
--Table variable to hold Search results
159159
CREATE TABLE #Results (
160-
[DatabaseName] nvarchar(128) NOT NULL
160+
[DatabaseName] nvarchar(128) NULL
161161
,[MatchIn] varchar(10) NOT NULL
162162
,[ObjectType] nvarchar(66) NOT NULL
163163
,[ObjectID] varchar(36) NOT NULL
@@ -621,7 +621,7 @@ BEGIN
621621
RAISERROR(N'Table schema to hold results', 0, 0);
622622
RAISERROR(N'----------------------------', 0, 0);
623623
SET @msg = N'CREATE TABLE #SearchResults(
624-
[DatabaseName] nvarchar(128) NOT NULL -- Database name of the match. In case of server scoped objects NULL
624+
[DatabaseName] nvarchar(128) NULL -- Database name of the match. In case of server scoped objects NULL
625625
,[MatchIn] varchar(10) NOT NULL -- Specifies whether match was in NAME or in definition
626626
,[ObjectType] nvarchar(66) NOT NULL -- Type of object found
627627
,[ObjectName] nvarchar(128) NULL -- Object name

0 commit comments

Comments
 (0)