SELECT ; App_ID, MAX(IndexRate) AS IndexRate, MAX(PurchaseDate) AS PurchaseDate, MAX(YEAR(PurchaseDate)) AS Year ; FROM AppStreams ; WHERE NOT CPIIndexed ; GROUP BY App_ID ; HAVING IndexRate > 0 ; INTO CURSOR IndexedAppsVFP complains about the HAVING clause. If I revert back to SET ENGINE 70, it's okay. The help notes say that I have to list all the columns except aggregating columns in the HAVING clause.