• Okay..... SLAP !!! 😀

    Seriously... CTEs can get the job done in SQL2005. Define two: cteA and cteB, both of which have a row number column ordered on month within year. Call the row number [RowNum]. CteA will represent the current month and cteB will represent the prior month. Then

    select cteA.year, cteA.month, cteA.salary

    from cteA

    join cteB on cteB.[RowNum] = cteA.[RowNum]-1

    where cteA.salary <> cteB.Salary