|
A simple answer is like this but it has problemsselect (select COUNT(*) from fdmbr where mbfile <= mbr.mbfile ) as RowNumber, mbr.* from fdmbr mbr
Column mbfile has to be unique and ordered - and if you use an order by it has to be on mbfile.
This is similar to something i posted a couple years ago - article is at http://archive.midrange.com/midrange-l/200405/msg00159.html I saw a solution that used the scratchpad in a UDF. the link is http://www.itjungle.com/fhg/fhg121405-story01.html HTH Vern At 12:18 PM 5/7/2006, you wrote:
Is it possible to display row number with each record in Sql? Best Regards, Luqman -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.