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,'')=''
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 = 1 AND Replace(D.DocAscii,'°','\''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 = 1 AND Replace(D.DocAscii,'0','\''B0') like @SearchString Collate SQL_Latin1_General_CP1_CS_AS)
OR (@CaseSensitive = 0 AND Replace(D.DocAscii,'0','\''B0') like @SearchString Collate SQL_Latin1_General_CP1_CI_AS)
)
AND
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
@ -3075,7 +3075,7 @@ ELSE
join Entries E on C.ContentID = E.ContentID
join Documents D on E.DocID = D.DocID
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
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
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 Documents D on E.DocID = D.DocID
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
((isnull(@StepTypeList,'') = '' /*and dbo.vefn_AllSections(C.Type)>=10000*/)
or ((dbo.vefn_AllSections(C.Type) in (Select ID from vefn_SplitInt(@StepTypeList,',')))))
@ -8610,7 +8610,7 @@ AS
BEGIN TRY -- Try Block
--+-----------------------------------------------------------------+
--¦ BEGIN TRANSACTION to make these changes temporary ¦
--& BEGIN TRANSACTION to make these changes temporary &
--+-----------------------------------------------------------------+
BEGIN TRANSACTION
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 [Folders] WHERE [Folders].[FormatID]=[Formats].[FormatID]) [FolderCount],
(SELECT COUNT(*) FROM [Formats] [Children] WHERE [Children].[ParentID]=[Formats].[FormatID]) [ChildCount]
FROM [Formats] ) T1
where Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0)
FROM [Formats] ) T1 WHERE [ParentID]=@ParentID AND [FormatID]<>@ParentID
AND (Description not like '%(Unused)%' or (ContentCount + DocVersionCount + FolderCount + ChildCount > 0))
RETURN
GO
-- Display the status of Proc creation
@ -13909,8 +13909,8 @@ BEGIN TRY -- Try Block
set nocount on
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '5/18/2018 11:00 AM'
set @RevDescription = 'Include Unused formats in Format Update'
set @RevDate = '6/8/2018 08:42 AM'
set @RevDescription = 'Fixed GetChildFormats stored procedure'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
IF( @@TRANCOUNT > 0 ) COMMIT