Re: record list in sql select

2014-11-20 Thread Rafael Copquin
Recno() is not good, because depending on the filter you get numbers with holes, like 1,2,35.56,etc. I need a sequential numbering, from 1 to rowcount Rafael Copquin El 19/11/2014 18:41, Stephen Russell escribió: On Wed, Nov 19, 2014 at 1:02 PM, Rafael Copquin rcopq...@fibertel.com.ar wrote:

Re: record list in sql select

2014-11-20 Thread Ted Roche
Is this true? Have you tested it? With a cursor readwrite, you're forcing an unfiltered cursor view, so the recno() should be sequential. On Thu, Nov 20, 2014 at 12:34 PM, Rafael Copquin rcopq...@fibertel.com.ar wrote: Recno() is not good, because depending on the filter you get numbers with

Re: record list in sql select

2014-11-20 Thread AndyHC
CREATE CURSOR cc (rec i autoinc, fld C(20) ) INSERT INTO cc (fld) SELECT fld FROM bigfile where code = 'yes' On 20/11/2014 23:04, Rafael Copquin wrote: Recno() is not good, because depending on the filter you get numbers with holes, like 1,2,35.56,etc. I need a sequential numbering, from 1 to

Re: record list in sql select

2014-11-20 Thread Rafael Copquin
I tried the solutions suggested here, (yours Ted and others) Instantaneous means less than one second. This is for showing, at the end of each record, the record number as a page number like this: page 245 of 1234987 As the user navigates the table up or down, top or bottom, the page number

Re: record list in sql select

2014-11-20 Thread Rafael Copquin
Awsome! I did not know you could insert directly from a select statement I learned something fabulous today Thank you very much indeed! Rafael Copquin El 20/11/2014 14:51, AndyHC escribió: CREATE CURSOR cc (rec i autoinc, fld C(20) ) INSERT INTO cc (fld) SELECT fld FROM bigfile where code

Re: record list in sql select

2014-11-20 Thread Rafael Copquin
you are right, I had not tested it. It works Rafael El 20/11/2014 14:47, Ted Roche escribió: Is this true? Have you tested it? With a cursor readwrite, you're forcing an unfiltered cursor view, so the recno() should be sequential. ___ Post

Re: record list in sql select

2014-11-20 Thread Gene Wirchenko
At 14:10 2014-11-19, Ted Roche tedro...@gmail.com wrote: On Wed, Nov 19, 2014 at 4:37 PM, Gene Wirchenko ge...@telus.net wrote: At 11:20 2014-11-19, Ted Roche tedro...@gmail.com wrote: FoxPro is faster than you think. REPLACE ALL (placeholderfield) WITH RECNO() is practically

Re: record list in sql select

2014-11-20 Thread Stephen Russell
On Thu, Nov 20, 2014 at 11:37 AM, Gene Wirchenko ge...@telus.net wrote: CREATE CURSOR fred (myresult c(10), therecno I) FOR I = 1 TO 11 INSERT INTO fred values( data, 0) NEXT REPLACE ALL therecno WITH RECNO() IN fred Subsecond result, on an old Core2 processor with 4 Gb RAM.

record list in sql select

2014-11-19 Thread Rafael Copquin
I am pulling a set of records from a big table, based on a filter condition in the select statement. I also want to create a field with the sequential number of those records. Example: select *, (function to number records) as recnbr from bigtable where filtercondition into cursor curFiltered

Re: record list in sql select

2014-11-19 Thread Ted Roche
FoxPro is faster than you think. REPLACE ALL (placeholderfield) WITH RECNO() is practically instantaneous, for reasonable values of instant. On Wed, Nov 19, 2014 at 2:02 PM, Rafael Copquin rcopq...@fibertel.com.ar wrote: I am pulling a set of records from a big table, based on a filter

Re: record list in sql select

2014-11-19 Thread Gene Wirchenko
At 11:20 2014-11-19, Ted Roche tedro...@gmail.com wrote: FoxPro is faster than you think. REPLACE ALL (placeholderfield) WITH RECNO() is practically instantaneous, for reasonable values of instant. Maybe not. I did something similar just now on a table of about 110,000 rows, and

Re: record list in sql select

2014-11-19 Thread Stephen Russell
On Wed, Nov 19, 2014 at 1:02 PM, Rafael Copquin rcopq...@fibertel.com.ar wrote: I am pulling a set of records from a big table, based on a filter condition in the select statement. I also want to create a field with the sequential number of those records. Example: select *, (function to

Re: record list in sql select

2014-11-19 Thread Ted Roche
On Wed, Nov 19, 2014 at 4:37 PM, Gene Wirchenko ge...@telus.net wrote: At 11:20 2014-11-19, Ted Roche tedro...@gmail.com wrote: FoxPro is faster than you think. REPLACE ALL (placeholderfield) WITH RECNO() is practically instantaneous, for reasonable values of instant. Maybe not.