Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select oldest record
Message
De
18/09/2007 14:56:05
 
 
À
18/09/2007 14:53:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01255231
Message ID:
01255234
Vues:
12
>does SELECT support a parameter that would allow the selection of the single oldest record in the table? Something like
>
>select min(datetimefield) from mytable
>
>but retrieving all the fields?
>
>Thanks
SELECT MyTable.*;
       FROM MyTable;
INNER JOIN (SELECT MIN(datetimefield) AS DtField FROM MyTable) Tbl1;
ON MyTable.datetimefield = Tbl1.DtField
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform