>>>>>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--