Added stored procedures for GetDisconnectedItemsCount and GetNonEditableItems
Revised SearchTransitions to prevent recursion error
This commit is contained in:
parent
577597fa54
commit
8a2224a95b
@ -9324,6 +9324,7 @@ BEGIN
|
||||
join @ttmp tt on I.ItemID = tt.itemid
|
||||
join Contents C on C.ContentID = I.ContentID
|
||||
left join Parts P on i.ItemID = P.ItemID
|
||||
OPTION (MAXRECURSION 10000)
|
||||
RETURN
|
||||
END
|
||||
END
|
||||
@ -10539,3 +10540,58 @@ GO
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: getROImagesByRODbID_FileName Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: getROImagesByRODbID_FileName Error on Creation'
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [vesp_GetDisconnectedItemsCount] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_GetDisconnectedItemsCount]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [vesp_GetDisconnectedItemsCount];
|
||||
GO
|
||||
|
||||
/*****************************************************************************
|
||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||
*****************************************************************************/
|
||||
CREATE PROCEDURE [dbo].[vesp_GetDisconnectedItemsCount]
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
SELECT COUNT(*) HowMany FROM vefn_GetDisconnectedItems()
|
||||
RETURN
|
||||
GO
|
||||
-- Display the status of Proc creation
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_GetDisconnectedItemsCount Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: vesp_GetDisconnectedItemsCount Error on Creation'
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [vesp_GetNonEditableItems] ******/
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_GetNonEditableItems]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE vesp_GetNonEditableItems;
|
||||
GO
|
||||
|
||||
/*****************************************************************************
|
||||
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||
Copyright 2012 - Volian Enterprises, Inc. All rights reserved.
|
||||
*****************************************************************************/
|
||||
CREATE PROCEDURE [dbo].[vesp_GetNonEditableItems]
|
||||
WITH EXECUTE AS OWNER
|
||||
AS
|
||||
SELECT
|
||||
I.[ItemID],
|
||||
I.[PreviousID],
|
||||
I.[ContentID],
|
||||
I.[DTS],
|
||||
I.[UserID],
|
||||
I.[LastChanged],
|
||||
(SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[ItemID]=[I].[ItemID]) [AnnotationCount],
|
||||
(SELECT COUNT(*) FROM [DocVersions] WHERE [DocVersions].[ItemID]=[I].[ItemID]) [DocVersionCount],
|
||||
(SELECT COUNT(*) FROM [Items] [Next] WHERE [Next].[PreviousID]=[I].[ItemID]) [NextCount],
|
||||
(SELECT COUNT(*) FROM [Parts] WHERE [Parts].[ItemID]=[I].[ItemID]) [PartCount],
|
||||
(SELECT COUNT(*) FROM [Transitions] WHERE [Transitions].[RangeID]=[I].[ItemID]) [Transition_RangeIDCount],
|
||||
(SELECT COUNT(*) FROM [Transitions] WHERE [Transitions].[ToID]=[I].[ItemID]) [Transition_ToIDCount]
|
||||
FROM [Items] I
|
||||
JOIN vefn_GetNonEditableItems() NE on I.ItemID = NE.ItemID
|
||||
RETURN
|
||||
GO
|
||||
-- Display the status of Proc creation
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: vesp_GetNonEditableItems Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: vesp_GetNonEditableItems Error on Creation'
|
||||
GO
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user