Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL group by syntax
Message
De
21/09/1996 11:04:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL group by syntax
Divers
Thread ID:
00008348
Message ID:
00008348
Vues:
89
I have a SQL that extract a specific set of datas from a table. One of my field extracted can occur more than once. I would like my SQL to only extract unique occuring of that field. So, this bring us to SELECT * FROM table GROUP BY field1.

But, I would like to be able to only keep the occurence of field1 which contain the highest date. Is there a syntax that will allow me to do something like this: SELECT * FROM table GROUP BY 1 ORDER BY date DESCENDING KEEP THE HIGHEST ONE.

I think you got the point. :)

Any idea?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform