I don't think so. Try this: proc sql; connect odbc (dsn); create table claims as select * from connection to odbc ( select mbr_id , prov_mpin , prov_id , max(prov_row_eff_dt) as prov_eff_dt from co.table where mbr_id > 0 group by 1,2,3 ) order by mbr_id; disconnect from odbc; quit; I reformatted your query to make it easier to read. I removed the DISTINCT keyword because I don't think it is needed, and I used column references (1,2,3) in the GROUP BY clause, which I'm pretty sure will work. I also deleted a stray semi-colon from your example code (in front of your ORDER BY clause).
... View more