>>The VFP9 help says:
>>The GROUP BY clause specifies one or more columns used to
>> group rows returned by the query. Columns referenced in the
>> SQL SELECT statement list, except for aggregate expressions,
>> must be included in the GROUP BY clause. You cannot group by
>> Memo, General, or Blob fields.
>>
>>So, I may SELECT any field, but if I am GROUPing BY, my SELECT field list may not include Memo fields? I think the help obfuscated that fact.
>
>The help clearly states that you cannot include non-aggregate fields that are not in the GROUP BY and memo fields cannot be in GROUP BY.The .AND. that you've added clarified the issue. I often read each sentence as a rule to be applied to the situation, and I missed the inference that the last sentence/rule applied to ths SELECT field list as well as the GROUP BY list.
Thanks for helping me figure it out.
Randy Bosma
VFP - Because life is too short to code in something else...