You're right about not needing the field names in the group by in VFP. But I'll stick with that requirement because it is a requirement on SQL Server and Oracle. If you don't place all fields not involved in a sum in the group by clause in SQL Server you get:
Column xxxx is invalid in the select list because it is not contained in either an aggregate function or the GROUP
PF
>>Sherry,
>>
>>I see several problems with this SQL. As a matter of fact I'm surprised it didn't error out.
>>
>>1) You have a field from Brokprod in your group by clause, yet no fields from Brokprod are in your select
>>
>>2) Any fields not involved in a sum, must be included in the group by clause.
(On an infant's shirt): Already smarter than Bush