B2016-209 – the dash (hyphen) character was not found in Word sections
This commit is contained in:
parent
65d9e6231d
commit
b4d867a517
@ -3033,11 +3033,18 @@ IF isnull(@SearchString,'%')='%'
|
|||||||
ELSE
|
ELSE
|
||||||
BEGIN
|
BEGIN
|
||||||
Declare @SearchStringx nvarchar(200) --kbr
|
Declare @SearchStringx nvarchar(200) --kbr
|
||||||
set @SearchStringx = replace(@SearchString,'-','\u8209?') --kbr
|
--set @SearchStringx = replace(@SearchString,'-','\u8209?') --kbr
|
||||||
--set @SearchStringx = replace(replace(@SearchString,'-','\u8209?'),'\','\u9586?') --kbr
|
--set @SearchStringx = replace(replace(@SearchString,'-','\u8209?'),'\','\u9586?') --kbr
|
||||||
|
set @SearchStringx = replace(@SearchString,'\u8209?','-') --JSJ B2016-209 not finding dashes in Word sections (FixSearchString converts '-' to '\u8209?')
|
||||||
IF @CaseSensitive = 0 -- Not Case Sensitive
|
IF @CaseSensitive = 0 -- Not Case Sensitive
|
||||||
BEGIN
|
BEGIN
|
||||||
insert into @FoundContents
|
insert into @FoundContents
|
||||||
|
select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchString,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C
|
||||||
|
where
|
||||||
|
(.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS)
|
||||||
|
AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
||||||
|
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
||||||
|
UNION -- B2016-209 to find dashes in word sections
|
||||||
select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchStringx,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C
|
select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchStringx,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C
|
||||||
where
|
where
|
||||||
(.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchStringx Collate SQL_Latin1_General_CP1_CI_AS)
|
(.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchStringx Collate SQL_Latin1_General_CP1_CI_AS)
|
||||||
@ -3048,7 +3055,7 @@ ELSE
|
|||||||
join Entries E on C.ContentID = E.ContentID
|
join Entries E on C.ContentID = E.ContentID
|
||||||
join Documents D on E.DocID = D.DocID
|
join Documents D on E.DocID = D.DocID
|
||||||
where
|
where
|
||||||
(D.DocAscii like @SearchString Collate SQL_Latin1_General_CP1_CI_AS)
|
(D.DocAscii like @SearchString OR D.DocAscii like @SearchStringx Collate SQL_Latin1_General_CP1_CI_AS)
|
||||||
AND
|
AND
|
||||||
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
||||||
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
||||||
@ -3058,17 +3065,24 @@ ELSE
|
|||||||
IF @CaseSensitive = 1 -- Case Sensitive
|
IF @CaseSensitive = 1 -- Case Sensitive
|
||||||
BEGIN
|
BEGIN
|
||||||
insert into @FoundContents
|
insert into @FoundContents
|
||||||
|
select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchString,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C
|
||||||
|
where
|
||||||
|
(.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CS_AS)
|
||||||
|
AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
||||||
|
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
||||||
|
UNION
|
||||||
select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchStringx,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C
|
select C.ContentID from vefn_FindContentText(@DocVersionList,@SearchStringx,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) C
|
||||||
where
|
where
|
||||||
(.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS)
|
(.dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS)
|
||||||
AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
AND ((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
||||||
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
||||||
UNION
|
|
||||||
|
UNION -- B2016-209 to find dashes in word sections
|
||||||
select C.ContentID from (select * from Contents where ContentID in(select ContentID from vefn_DVContent(@DocVersionList))) C
|
select C.ContentID from (select * from Contents where ContentID in(select ContentID from vefn_DVContent(@DocVersionList))) C
|
||||||
join Entries E on C.ContentID = E.ContentID
|
join Entries E on C.ContentID = E.ContentID
|
||||||
join Documents D on E.DocID = D.DocID
|
join Documents D on E.DocID = D.DocID
|
||||||
where
|
where
|
||||||
(D.DocAscii like @SearchString Collate SQL_Latin1_General_CP1_CS_AS)
|
(D.DocAscii like @SearchString OR D.DocAscii like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS)
|
||||||
AND
|
AND
|
||||||
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
|
||||||
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
|
||||||
@ -13127,8 +13141,8 @@ BEGIN TRY -- Try Block
|
|||||||
set nocount on
|
set nocount on
|
||||||
DECLARE @RevDate varchar(255)
|
DECLARE @RevDate varchar(255)
|
||||||
DECLARE @RevDescription varchar(255)
|
DECLARE @RevDescription varchar(255)
|
||||||
set @RevDate = '8/22/2016 8:30 AM'
|
set @RevDate = '9/16/2016 1:30 PM'
|
||||||
set @RevDescription = 'Updated ve_GetItemDerivedApplicability for Non PC P/C Procedure Sets (Maximum Applicability)'
|
set @RevDescription = 'Fixed Search for dash character in Word sections'
|
||||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||||
IF( @@TRANCOUNT > 0 ) COMMIT
|
IF( @@TRANCOUNT > 0 ) COMMIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user