Sorry for the nondescript title. I\'ll edit as we go along.
I have a table RateTable
:
| Code | Date | Rate |
B001 2009-
If I read this right, you aren't looking for modified rows, but rows where the rate changes from the previous date. This query or something like it should do it:
SELECT r1.Code, r1.Date, r1.Rate
FROM RateTable r1
WHERE r1.Rate <> (SELECT TOP 1 Rate
FROM RateTable
WHERE Date < r1.Date
ORDER BY Date DESC)