B2018-086 - Corrected the Stored Procedure GetChildFormats. This is currently unused, but, it will be used for User Control of Format.

This commit is contained in:
Rich 2018-06-11 14:28:29 +00:00
parent 7d0f3b1c8b
commit 0e8ebc1001

View File

@ -1960,8 +1960,8 @@ select DvPath, Path, I.[Level],I.[FromType],I.[Ordinal], I.[ParentID], I.[ItemID
(isnull(@SearchString,'')='' (isnull(@SearchString,'')=''
OR (@CaseSensitive = 1 AND .dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CS_AS) OR (@CaseSensitive = 1 AND .dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CS_AS)
OR (@CaseSensitive = 0 AND .dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS) OR (@CaseSensitive = 0 AND .dbo.vefn_RemoveExtraText(C.Text,@IncludeLinks, @IncludeRtfFormatting, @IncludeSpecialCharacters) like @SearchString Collate SQL_Latin1_General_CP1_CI_AS)
OR (@CaseSensitive = 1 AND Replace(D.DocAscii,'°','\''B0') like @SearchString Collate SQL_Latin1_General_CP1_CS_AS) OR (@CaseSensitive = 1 AND Replace(D.DocAscii,'0','\''B0') like @SearchString Collate SQL_Latin1_General_CP1_CS_AS)
OR (@CaseSensitive = 0 AND Replace(D.DocAscii,'°','\''B0') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS) OR (@CaseSensitive = 0 AND Replace(D.DocAscii,'0','\''B0') like @SearchString 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*/)
@ -3075,7 +3075,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
(Replace(D.DocAscii,'°','\''B0') like @SearchString OR Replace(D.DocAscii,'°','\''B0') like @SearchStringx Collate SQL_Latin1_General_CP1_CI_AS) (Replace(D.DocAscii,'0','\''B0') like @SearchString OR Replace(D.DocAscii,'0','\''B0') 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,',')))))
@ -3102,7 +3102,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
(Replace(D.DocAscii,'°','\''B0') like @SearchString OR Replace(D.DocAscii,'°','\''B0') like @SearchStringx Collate SQL_Latin1_General_CP1_CS_AS) (Replace(D.DocAscii,'0','\''B0') like @SearchString OR Replace(D.DocAscii,'0','\''B0') 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,',')))))
@ -8610,7 +8610,7 @@ AS
BEGIN TRY -- Try Block BEGIN TRY -- Try Block
--+-----------------------------------------------------------------+ --+-----------------------------------------------------------------+
--¦ BEGIN TRANSACTION to make these changes temporary ¦ --& BEGIN TRANSACTION to make these changes temporary &
--+-----------------------------------------------------------------+ --+-----------------------------------------------------------------+
BEGIN TRANSACTION BEGIN TRANSACTION
if exists (select * from tblitems where itemid = @StartItemID and DeleteStatus !=0) if exists (select * from tblitems where itemid = @StartItemID and DeleteStatus !=0)
@ -13805,8 +13805,8 @@ AS
(SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formats].[FormatID]) [DocVersionCount], (SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[FormatID]=[Formats].[FormatID]) [DocVersionCount],
(SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formats].[FormatID]) [FolderCount], (SELECT COUNT(*) FROM [Folders] WHERE [Folders].[FormatID]=[Formats].[FormatID]) [FolderCount],
(SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formats].[FormatID]) [ChildCount] (SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formats].[FormatID]) [ChildCount]
FROM [Formats] ) T1 FROM [Formats] ) T1 WHERE [ParentID]=@ParentID AND [FormatID]<>@ParentID
where Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0) AND (Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0))
RETURN RETURN
GO GO
-- Display the status of Proc creation -- Display the status of Proc creation
@ -13909,8 +13909,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 = '5/18/2018 11:00 AM' set @RevDate = '6/8/2018 08:42 AM'
set @RevDescription = 'Include Unused formats in Format Update' set @RevDescription = 'Fixed GetChildFormats stored procedure'
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