From 6ae1fcda1a36fe6c4bbc2936c355100012eccd1e Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 17 Feb 2016 19:14:11 +0000 Subject: [PATCH] Allow delete of grid/content when deleted rousages and transitions exist. This was causing the code to crash. --- PROMS/DataLoader/PROMSFixes.Sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PROMS/DataLoader/PROMSFixes.Sql b/PROMS/DataLoader/PROMSFixes.Sql index a0821d83..fd031e8d 100644 --- a/PROMS/DataLoader/PROMSFixes.Sql +++ b/PROMS/DataLoader/PROMSFixes.Sql @@ -8965,7 +8965,7 @@ GO /***************************************************************************** Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE - Copyright 2012 - Volian Enterprises, Inc. All rights reserved. + Copyright 2016 - Volian Enterprises, Inc. All rights reserved. *****************************************************************************/ CREATE PROCEDURE [dbo].[DeleteItemAndChildren] ( @@ -9104,6 +9104,10 @@ BEGIN TRY -- Try Block Update Items set PreviousID = null where ItemID in (Select ItemID from @Children) and PreviousID Is Not Null -- Delete Item Records DELETE from Items where ItemID in(Select ItemID from @Children) + -- Remove Previously deleted transitions + DELETE from tblTransitions where deletestatus = -1 and FromID in(SELECT ContentID FROM @Children) + -- Remove Previously deleted rousages + DELETE from tblrousages where deletestatus = -1 and contentID in(SELECT ContentID FROM @Children) -- DELETE Contents DELETE from Contents where ContentID in(Select ContentID from @Children) --purge deletelog