>>>>It's not a GROUP BY but the same rule applies, only aggregate functions can be used.
>>>>
>>>>
SELECT MAX(trackrcd.date), MAX(ALLTRIM(trackrcd.t_s_num)) FROM trackrcd ;
>>>
>>>I need the specific trackrcd.t_s_num that belongs to the Max(date), so I don't think that will work.
>>
>>
>>In your query in VFP6 t_s_num is not returned from a record with MAX(trackrcd.date) but from last physical record that meets filter conditions.
>
>Okay, I will be working on rewriting this to be correct. < s > but it seamed(sp?) to work. Maybe they did not use it very much, so I did not know. Thanks again for the info.
You will get correct result in VFP6 as along as records in the table are added in the chronological order.
--sb--