View Full Version : selecting last rows in database
i know you can use:
"select top 7 from table"
but how can i select the last rows?
or is there something like
"select * from table limit 7"?:confused:
i need it to ascend not descend
Roy Sinclair
10-22-2002, 03:16 PM
Use the select with sorted descending to get the records you want then use the recordset.sort property to change the sort order within the recordset to be ascending.
it is possible to do it any other way? I get the error:
ADODB.Recordset error '800a0cb3'
Current provider does not support the necessary interfaces for sorting or filtering.
/default.asp, line 173
Roy Sinclair
10-22-2002, 06:18 PM
Do it this way then:
select * from (select top 7 * from table order by field desc) order by field
thank you very much! you made my day. :D :thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.