I am trying to return a pay rate and date of that rate when changed from a database that has the information by week
PersonID Weekending PayRate DatePaid ...for every week in 2009. Each week is a row. I want to return the starting payrate and first date paid and then in the same row return any new pay rate and date paid it was first applied
PersonID PayRate1 Datepaid1 payrate2 datepaid2 payrate3 datepaid3
If there is no difference in the payrate from 1 to 2 for instance I do not want any data in that colume.
I am not getting the data back correctly