Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Records matching MAX(Date)
Message
De
19/08/2002 03:16:06
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00690278
Message ID:
00690947
Vues:
20
>>>>>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

Nadya,
Still can't see what's different.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform