Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting the last record of a table
Message
 
 
To
08/09/2003 15:50:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00827253
Message ID:
00827262
Views:
16
>How about:
>
>
>SELECT * FROM yourtable WHERE RecNo() = RecCount()
>
>
>>Is there a way to select the last record of a table with only a select statement?

It woudldn't work if last record is deleted. Try
SELECT MAX(RECNO()) AS MaxRN FROM prod ;
	INTO ARRAY aMaxRecno
SELECT * FROM prod ;
	WHERE RECNO() = aMaxRecno[1]
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform