Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Records matching MAX(Date)
Message
From
16/08/2002 12:56:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00690278
Message ID:
00690437
Views:
18
>>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform