~Restructured PROMSFixes.sql to add updates above section that lists RevDate and RevDescription

This commit is contained in:
Chris Glavan 2023-10-03 11:09:47 -04:00
parent 4be7cdc6c7
commit cbcf7c845d

View File

@ -21941,63 +21941,6 @@ GO
==========================================================================================================
*/
-----------------------------------------------------------------------------
/*
---------------------------------------------------------------------------
| ADD New Code Before this Block |
| Change Date and Description |
---------------------------------------------------------------------------
*/
-----------------------------------------------------------------------------
-- Rebuild / Reorganize All Indexes
exec [dbo].[vesp_UtilityCheckIndexes];
IF (@@Error = 0) PRINT 'Running vesp_UtilityCheckIndexes Succeeded'
ELSE PRINT 'Running vesp_UtilityCheckIndexes Failed to Execute'
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_GetSQLCodeRevision]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_GetSQLCodeRevision];
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2022 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[vesp_GetSQLCodeRevision]
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
-- Change information in the next line when you are done
set nocount on
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '10/03/2022 2:00 PM'
set @RevDescription = 'B2022-124: [JPR] Blank RO Values (All Spaces) printing as ?'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'StoredProcedure [vesp_GetSQLCodeRevision] Succeeded'
ELSE PRINT 'StoredProcedure [vesp_GetSQLCodeRevision] Error on Creation'
go
Exec vesp_GetSQLCodeRevision;
/****** Add the ApplicablePlant field to the Formats table ******/
ALTER TABLE Formats ADD ApplicablePlant int NULL;
GO
@ -22200,4 +22143,62 @@ AS
WHERE
[Folders].[FormatID]=@FormatID
RETURN
RETURN
-----------------------------------------------------------------------------
/*
---------------------------------------------------------------------------
| ADD New Code Before this Block |
| Change Date and Description |
---------------------------------------------------------------------------
*/
-----------------------------------------------------------------------------
-- Rebuild / Reorganize All Indexes
exec [dbo].[vesp_UtilityCheckIndexes];
IF (@@Error = 0) PRINT 'Running vesp_UtilityCheckIndexes Succeeded'
ELSE PRINT 'Running vesp_UtilityCheckIndexes Failed to Execute'
GO
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_GetSQLCodeRevision]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE [vesp_GetSQLCodeRevision];
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2022 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
CREATE PROCEDURE [dbo].[vesp_GetSQLCodeRevision]
WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
-- Change information in the next line when you are done
set nocount on
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '10/03/2023 11:00 AM'
set @RevDescription = 'C2023-017: Added logic to filter the format list when selecting a format to be applied to a section'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
IF( @@TRANCOUNT = 1 ) ROLLBACK -- Only rollback if top level
ELSE IF( @@TRANCOUNT > 1 ) COMMIT -- Otherwise commit. Top level will rollback
EXEC vlnErrorHandler
END CATCH
GO
-- Display the status of Proc creation
IF (@@Error = 0) PRINT 'StoredProcedure [vesp_GetSQLCodeRevision] Succeeded'
ELSE PRINT 'StoredProcedure [vesp_GetSQLCodeRevision] Error on Creation'
go
Exec vesp_GetSQLCodeRevision;