WITH CTE_TEST AS
(
SELECT PerformanceDate, Score ,Category ,Reason ,UserName,Event_Date,
ROW_NUMBER() OVER (PARTITION BY PerformanceDate, Score ,Category ,Reason ,UserName,Event_Date ORDER BY PerformanceDate) AS row_num
FROM tbl_Temp
)
SELECT
[current].PerformanceDate,[current].Score ,[current].Category ,[current].Reason ,[current].UserName,[current].Event_Date,
FROM
CTE_TEST AS [current]
LEFT OUTER JOIN
CTE_TEST AS previous
ON [current].PerformanceDate = previous.PerformanceDate
AND [current].Score = previous.Score
AND [current].Category = previous.Category
AND [current].Reason = previous.Reason
AND [current].UserName = previous.UserName
AND [current].Event_Date = previous.Event_Date
AND [current].row_num = previous.row_num + 1
WHERE
[current].PerformanceDate = previous.PerformanceDate
AND [current].Score <> previous.Score
AND [current].Category <>previous.Category
AND [current].Reason <> previous.Reason
AND [current].UserName <>previous.UserName
AND [current].Event_Date <>previous.Event_Date
ORDER BY
[current].PerformanceDate
I have tested it with my table. Its working fin. If it didnt work, send me your table script, i will help you