DECLARE @TaskName VARCHAR(200) = 'Suggested Count Data'
DECLARE @ConcatenatorTaskName VARCHAR(200) = 'Suggested Count Data Concatenator'

declare @XSLTManagerID BIGINT
declare @concatenatorXSLTManagerID BIGINT


SELECT @XSLTManagerID = XSLTManagerID
		FROM tbXSLTManager WITH (NOLOCK)
		WHERE NAME = @TaskName

SELECT @concatenatorXSLTManagerID = XSLTManagerID
		FROM tbXSLTManager WITH (NOLOCK)
		WHERE NAME = @ConcatenatorTaskName
		
DELETE FROM tbXSLTManager WHERE XSLTManagerID in (@XSLTManagerID, @concatenatorXSLTManagerID)
DELETE FROM tbXSLTManagerdetails WHERE XSLTManagerID in (@XSLTManagerID, @concatenatorXSLTManagerID)
DELETE FROM tbXSLTManagerScripts WHERE XSLTManagerID in (@XSLTManagerID, @concatenatorXSLTManagerID)

GO

EXEC [dbo].[Rollback_RemoveDeployHistory] '211124-CWG-1.sql'

GO