Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining the last record in a DBF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01085156
Message ID:
01085174
Vues:
17
>>>>>How would I determine the last record in a DBF using SQL?
>>>>>I've seem some examples on the net but they are = sql engine specific.
>>>>
>>>>What is the defenition of the last record? Which column(s) determine the order?
>>>
>>>The last record entered into the table chronologically.
>>
>>You have to have a column in the table that holds this information. There's no such thing as chronological order in the tables on client-sever backends in general. For MS SQL server, for example, the records are ordered either by clustered index, if there's one, or not ordered at all.
>
>But this is a DBF I'm working with here. MAX(RECNO()) would be the record but I want the other fields as well.

Try.
SELECT * FROM mytable WHERE RECNO() = (SELECT(MAX(RECNO()) FROM mytable)
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform