GROUP BY 1,2 ;However, the values in the other fields not included in the GROUP BY will be taken from the last record in the group. Also such query wouldn't work on any other backend.
>SELECT DISTINCT field1 AS type1 ; > field2 AS type2, ; > 000000 AS valcnt, ; > 000000 AS invcnt, ; > 00000000.00 AS chq_tot, ; > SPACE(40) AS descr, ; > SPACE(20) AS cname, ; > 000000.00 AS conv_amt, ; > m.currpromo AS p_no, ; > 000.000000000 AS conv_unit ; > FROM PROM ; > GROUP BY 1 ; > INTO TABLE(m.tmp_path + "tmpfile.dbf") > INDEX ON type1 TO c:\temp\tmpfile.idx COMPACT>