select fd1.DsID, fd1.rcode, fd1.town, ; fd1.Record_fm, fd1.Record_to, ; fd1.LandCt_fm, fd1.LandCt_to, ; nvl(fd2.Record_fm,{}) as PriorRec_fm, ; nvl(fd2.Record_to,{}) as PriorRec_To, ; nvl(fd2.LandCt_fm,{}) as PriorLC_fm, ; nvl(fd2.LandCt_to,{}) as PriorLC_to ; from FilingDate fd1 left join FilingDate fd2 ; on fd1.DsID=fd2.DsID ; where fd1.rcode+fd1.town+fd1.ExtrYear+ ; fd1.ExtrWeek = m.lcRtWeek ; and fd2.rcode+fd2.town+fd2.ExtrYear+ ; fd2.ExtrWeek = m.lcRtPriorWeek ; order by 2,3 ; into cursor TmpDatesHowever, lcRtPriorWeek is different for each town and should be the week, when last time information was recorded prior to the current date.