C2026-002 Admin Tool - Data Check - Enhancements to new admin Tool for ROs not used.
Add the ability to filter out groups of Alarms from the results.
This commit is contained in:
@@ -24436,6 +24436,15 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_GetROsNotUs
|
||||
DROP PROCEDURE [vesp_GetROsNotUsed];
|
||||
|
||||
GO
|
||||
-- Need to drop vesp_GetROsNotUsed SP first so script can drop and recreate the TableValID table type
|
||||
IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.DOMAINS WHERE Domain_Name = 'TableValID' )
|
||||
DROP TYPE [dbo].[TableValID]
|
||||
|
||||
CREATE TYPE [dbo].[TableValID] AS TABLE(
|
||||
[ID] [bigint] NOT NULL
|
||||
|
||||
)
|
||||
GO
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[vesp_GetROsNotUsed] ******/
|
||||
|
||||
@@ -24445,6 +24454,9 @@ GO
|
||||
-- Description: Returns ROs that are not Used in PROMS
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[vesp_GetROsNotUsed]
|
||||
(
|
||||
@dbIDs AS dbo.TableValID READONLY
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
@@ -24464,6 +24476,7 @@ BEGIN
|
||||
FROM RofstChild
|
||||
INNER JOIN RofstDatabase fstdb on fstdb.RofstID = RofstChild.RofstID and fstdb.dbiID = RofstChild.dbiID
|
||||
INNER JOIN @FSTs fst on fst.RofstID = fstdb.RofstID AND RofstChild.RofstID = fst.RofstID
|
||||
INNER JOIN @dbIDs dbIDs on dbIDs.ID = RofstChild.dbiID --downbase to only dbs included
|
||||
LEFT OUTER JOIN RofstChild subchild ON subChild.ParentID = RofstChild.ID --make sure it is not a parent of something else
|
||||
LEFT OUTER JOIN DRoUsages ON [DRoUsages].[ROID] like RofstChild.[ROID] + '%' AND fst.RODbID = DROUsages.RODbID --not used in documents
|
||||
LEFT OUTER JOIN RoUsages ON [RoUsages].[ROID] like RofstChild.[ROID] + '%' AND fst.RODbID = ROUsages.RODbID --not used in regular ROs
|
||||
@@ -24488,6 +24501,7 @@ BEGIN
|
||||
SELECT DISTINCT NULL, NULL, RofstDatabase.ID, RofstDatabase.ParentID, RofstDatabase.dbiID, RofstDatabase.dbiTitle
|
||||
FROM RofstDatabase
|
||||
INNER JOIN @FSTs fst on fst.RofstID = RofstDatabase.RofstID
|
||||
INNER JOIN @dbIDs dbIDs on RofstDatabase.dbiID = dbIDs.ID --downbase to only dbs included
|
||||
|
||||
select *
|
||||
FROM #notused notused
|
||||
@@ -24548,7 +24562,7 @@ BEGIN TRY -- Try Block
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
|
||||
set @RevDate = '1/12/2026 2:00 PM'
|
||||
set @RevDate = '1/16/2026 7:00 AM'
|
||||
set @RevDescription = 'Added Method to get ROs that are not used in PROMS'
|
||||
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
|
||||
Reference in New Issue
Block a user