|
> HI I am not sure if this is the right list for an SQL question, > as I don't see any specific SQL List. If you can post the RPG code where you tried to get the task accomplished, it's probably the right place. Otherwise, MIDRANGE-L has a larger audience, and therefore a higher probability of finding an SQL person than a list focussed on RPG. > I would like to know how to add a column for each > record simply as a sequential number and then getting > a total at the end (count). Could you please list a sample of the raw data you are working with, and what you want to end up with? It is difficult to tell if you are trying to add ROWNUMBER() and total THAT, or add ROWNUMBER() and the highest value of ROWNUMBER() or if the issue is that you are trying to see detail and a total in the same query or something altogether different. As always, a description of the business problem is often more helpful than a description of the technical problem. Are you trying to add a line number to a purchase order, and find out how many lines are on the PO? Perhaps you're creating some sort of check digit functionality? --buck
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.