SET NOCOUNT ON
BEGIN TRY
BEGIN TRANSACTION
/********************************************************************************************/
PRINT '--> Update ClassificationCriteria';
UPDATE CC1 set CC1.Sequence = CC2.rownum FROM ClassificationCriteria AS CC1
JOIN
(SELECT ROW_NUMBER() OVER(PARTITION BY ClassificationID ORDER BY ClassificationID, ParentID, Sequence) - 1...