On Wed, Nov 19, 2014 at 1:02 PM, Rafael Copquin <[email protected]> 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 number records) as recnbr from bigtable where > filtercondition into cursor curFiltered readwrite > > What I need is a function or method to fill the recnbr field with > sequential numbers, starting at 1 such that the resulting filtered set > looks like: > > coname city recnbr > Widgets inc New York 1 > John Doe's New York 2 > etc > > The filter is the city (New York) and the table has more than one million > records > > I know I could select the recnbr field as zero and then use a scan endscan > construct to replace it with the numbers, like > ------------ Isn't recno() already doing that? Select *, recno() from curFiltered -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJidMY+=gJ92WbvMpedShYQtfTHi8t_9yuU-fM3ZZV5r=xz...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

