select * from changedappointments into cursor changedappsinfo nofilter; where changedappointments.datechange >= mrepbegindate .AND. ; changedappointments.datechange <= mrependdate ; group by changedappointments.localdoc,changedappointments.pat_name ; order by changedappointments.localdoc, changedappointments.pat_name COPY TO revisedapps TYPE FOX2XThe above code is just one part of the if/else condition. Am I doing this right? Thanks for your help.