× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The business would like to know, how many trading partners there in total. This 
includes from the business, as well as for clients that the business provides 
services for, including EDI. So that you may have duplicate trading partners, 
those of the business and at the same time of the clients customers. 
The raw data is a file from Premenos. There is some simple filtering such as an 
Active status, only want in this case 850's, and so on. So I created a file out 
of this. Then in a different statement I do a Select Distinct, so as to weed 
out dups. Now this Select Distinct prints out just the names. I would like to 
provide a simple sequential number, w/ a total. Bear in mind, that this simple 
report will likely grow into something far more interesting.
Thank you,
Rob400
> -----Original Message-----
> From: Buck [mailto:buck.calabro@xxxxxxxxxxxx]
> Sent: Thursday, March 18, 2004, 2:02 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: Re: SQL
> 
> > 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
> 
> 
> 
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.