>>Table name: table1 >>Record count: 137,866 >>Fields: filenum I,field1,field2...field124 >>index: filenum >>>>I'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 ; >> nofilter >>>>The 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 ; >> nofilter >>>>
>1. foud the nSelectCount fileNum and do the second select >SELECT table1 >set order to filenum >set near on >seek M.nFilenum >set near off >COUNT NEXT m.nSelectCount >upperfilenum = IIF(EOF(),MAXFILENUMALLOWEDCOSTANT,filenum) > >select * ; > from table1 ; > where filenum BETWEEN M.nFilenum and M.upperfilenumt; > order by filenum ; > into cursor curMySelection NOFILTER > >2. You can use a in order SCAN with INSER >* BUILD THE RESUL CURSOR >select * from table1 ; > where .f. into cursor curMySelection ; > readwrite >SELECT table1 >set order to filenum >set near on >seek M.nFilenum >set near off >SCAN NEXT m.nSelectCount > * append table1.record into curMySelection >ENDSCAN >Grazie, Fabio for the reply, I shall try your methods. I had to do something different since I posted the message thus the delay in the response.
"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