Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select oldest record
Message
 
To
18/09/2007 14:53:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01255231
Message ID:
01255234
Views:
13
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform