Add separate counts for Errors, Warnings and Information

Cleanup memory after transition processing
Adjusted width of Error Count
Added memory usage to output
Added Stored Procedure GetJustFormat
Reduce Memory Use
Removed extra using statement
This commit is contained in:
Rich
2012-05-21 13:30:21 +00:00
parent 508a86a8ac
commit f5544b7053
9 changed files with 117 additions and 37 deletions

View File

@@ -7378,6 +7378,42 @@ IF (@@Error = 0) PRINT 'Procedure Creation: getFormat Succeeded'
ELSE PRINT 'Procedure Creation: getFormat Error on Creation'
GO
/****** Object: StoredProcedure [getJustFormat] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getJustFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [getJustFormat];
GO
CREATE PROCEDURE [dbo].[getJustFormat]
(
@FormatID int
)
WITH EXECUTE AS OWNER
AS
SELECT
[FormatID],
[ParentID],
[Name],
[Description],
[Data],
[GenMac],
[DTS],
[UserID],
[LastChanged],
(SELECT COUNT(*) FROM [Contents] WHERE [Contents].[FormatID]=[Formats].[FormatID]) [ContentCount],
(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]
WHERE [FormatID]=@FormatID
RETURN
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'Procedure Creation: getJustFormat Succeeded'
ELSE PRINT 'Procedure Creation: getJustFormat Error on Creation'
GO
/****** Object: StoredProcedure [getFormat] ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getFormatByName]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [getFormatByName];