>>>>That's a simple case. If you would have several max date records, you would have several records.
>>>>
>>>>But what if you need to find only one (or few) records with maximum date for each particular group, say, by Town?
>>>
>>>If you're searching for 'Nadya' and there are several 'Nadya' you'd get all of them. If you want to search for 'Nadya Nosonovsky' then be more specific and use 'and' to include 'Nosonovsky'.
>>>Cetin
>>
>>Here is what I meant:
>>
>>select town, max(date) as MaxDate from FilingDates group by Town into cursor MaxDates
>>
>>select * from FilingDates ... ???
>>
>>We need to select info from the table, where we would have record for each group with MAX date.
>
>I can't understand :( Isn't what you're looking ino replaced with town in sample? Sounds like you say it in a different way.
>Cetin
Hi Cetin,
Ok, here is a problem:
town fullname dateBeg DateEnd
town1 fullname1 date1 date2
town1 fullname1 date3 date4
townN fullname1 date1N date2N
townN fullname1 date3N date4N
We need info from this table for each town code, which corresponds to max dateEnd
If it's not broken, fix it until it is.
My Blog