select * from myTable where pkfield IN (select top 100 pkfield from myTable order by pkfield DESC)>>select top 100 pkField from myTable ORDER BY PkField DESC ?
Set order to pkField desc local lnFnd, loScat Copy structure to myCursor lnFnd = 0 Scan while m.lnFnd<100 scatter memo name loSact insert into myCursor Name loScat lnFnd = m.lnFnd+1 endscan Set order to pkField descYou can keep the SQL-equivalent in comment for upgrading to SQL backends... Might be a good check into the SQL-engine, if the table has a couple of million recs.