SELECT TOP nnn * FROM mytable ; WHERE ... ; ORDER BY ... ; INTO CURSOR mycursor READWRITE IF _TALLY > nnn GOTO (nnn+1) DELETE REST ENDIFKeep in mind that there could be more than nnn records in cursor if there is tie between the record nnn and following records.