• Forgot the entity chunk. Yes you will need a CTE and a Row_Number function.

    [Code]

    DECLARE @EntityID INT = 123;

    WITH cte

    AS (

    SELECT row_Number() OVER (ORDER BY Audit_ID) AS RN

    ,t.Field_B

    ,t.ActionDate

    FROM #test t

    WHERE @EntityID = t.EntID

    )

    SELECT t1.ActionDate

    ,t1.Field_B

    FROM cte t1

    LEFT JOIN cte t2 ON t1.RN = t2.RN - 1

    WHERE t1.Field_B != t2.Field_B

    OR t2.RN IS NULL

    [/code]