Dorris,
You've to include all fields that are not aggregate functions into group by. It's documented in VFP8 help under
Behavior Changes Since Visual FoxPro 7.0 and in
INFO: SQL SELECT Behavior Changes in Visual FoxPro 8.0 mskb #
813361.
>ok...can someone tell me WHY this gives me "SQL: Group by clause missing or invalid" in VFP8
>
>Sele inv_no, inv_locat, serial_no, sum(cost) as totcost,;
> Descrip, budget, user_code, phys_loc, Source, ;
> duplicate, loc_name, loc_code;
> From shrt1 group by 1 into cursor short2
>
>
>yet this one doesn't?
>SELECT inv_no, sum(cost) as totcost FROM shrt1 GROUP BY 1 INTO CURSOR chkcst
>
>
>The only difference between the two statements (that I can see) is the field list....
--sb--