Table name: table1 Record count: 137,866 Fields: filenum I,field1,field2...field124 index: filenumI've created a query form allowwing the user to select top N of records in the following manner:
select top nSelectCount ; * ; from table1 ; where filenum >= nFilenum ; order by filenum ; into cursor curMySelection ; nofilterThe user determines the values of nSelectCount and nFilenum through the form interface.
select top nSelectCount ; * ; from table1 ; where filenum >= nFilenum and filenum <= nFilenum + nSelectCount; order by filenum ; into cursor curMySelection ; nofilterThe reason I couldn't use the second statement is that the filenum is not always in sequence due records deletion, therefore the user doesn't get top nSelectCount, worse yet sometimes he gets nothing.
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature