If you don't need the rest of the fields, don't include them in the SELECT field list. Otherwise how would SQL Engine know that grouping on them is unnecessary? Also you cannot group on memo, general or blob fields.
>
>I have the below select statement. Except for the first 2 fields in the GROUP BY none of them are necessary, of course I can change the ENGINEBEHAVIOR and get the query to run without the additional field. In any case I have listed all the TPATIENTS fields and the other fields that are in the SELECT statement, yet I am getting the message that the GROUP BY is missing or invalid. I have tried to remove the mAddress field (being a memo field) but no joy. Can someone spot what I am missing.
>
<snip>
--sb--