× 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.



Just place a SUM around the field you want to total.

SUM(myField)

Michael Schutte



                                                                           
             steema@diskhaven.                                             
             com                                                           
             Sent by:                                                   To 
             rpg400-l-bounces@         "RPG programming on the AS400 /     
             midrange.com              iSeries" <rpg400-l@xxxxxxxxxxxx>    
                                                                        cc 
                                                                           
             05/18/2006 09:37                                      Subject 
             AM                        RE: Use SQL instead of RPG?         
                                                                           
                                                                           
             Please respond to                                             
              RPG programming                                              
              on the AS400 /                                               
                  iSeries                                                  
             <rpg400-l@midrang                                             
                  e.com>                                                   
                                                                           
                                                                           




Can you also do a totaling in this SQL Statement or should I run an RPG
program for totaling of all quantity of models numbers?

Thanks,
Steve

> Isn't it kinda strange to have a on-line program running the sql
> selection in batch?  Am I missing something?
>
> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of steema@xxxxxxxxxxxxx
> Sent: Wednesday, May 17, 2006 1:39 PM
> To: RPG programming on the AS400 / iSeries
> Subject: Re: Use SQL instead of RPG?
>
> Michael, I do want to put the results into a subfile, but it has to be a
> batch process, so I would like the CL to run this SQL Union.
>
>> Just curious, why does it need to be in the CL?  I thought you were
>> wanting to put the results into a subfile?
>>
>> Anyway... the only thing that I know that you can do is and as I know
>> it ...
>>
>>    On the command line type:   Go Query
>>    Take Option 10
>>    Take Option 1
>>    Create new query.
>>    You'll now be in something similar to Query/400.
>>    Specify one file
>>    Exit and save the query.
>>    Now convert the query to SQL, Put a 10 on the new query.
>>    You may keep the same name.
>>    Now put a 2 on the query to edit the SQL.
>>    Now copy your SQL statement in there.
>>    Then in the CL, you have to use the STRQMQRY to execute the SQL
>> that you
>>    created.
>>
>>
>> Michael Schutte
>>
>>
>>
>>
>>              steema@diskhaven.
>>              com
>>              Sent by:
> To
>>              rpg400-l-bounces@         "RPG programming on the AS400 /
>>              midrange.com              iSeries"
> <rpg400-l@xxxxxxxxxxxx>
>>
>
>> cc
>>
>>              05/17/2006 02:18
> Subject
>>              PM                        Re: Use SQL instead of RPG?
>>
>>
>>              Please respond to
>>               RPG programming
>>               on the AS400 /
>>                   iSeries
>>              <rpg400-l@midrang
>>                   e.com>
>>
>>
>>
>>
>>
>>
>> Charles's Idea was the answer. Now I would like to put this SQL into
>> an CL.
>>
>>> What is a pivot table?  I've heard the term, now my curiosity is
>>> aroused.
>>>
>>> rob@xxxxxxxxx wrote:
>>>> I think Charles has the best grasp on it.  Ideally one would
>>>> normalize this database to stop this ridiculousness.  Gotta go, but
>>>> there's a brain cell somewhere shrieking out a buzzword to pop out
>>>> before I duck and
>>>> run:
>>>> Pivot table perhaps?
>>>>
>>>> Rob Berendt
>>>
>>> --
>>> ---------------------------------
>>> Booth Martin
>>> http://www.Martinvt.com
>>> ---------------------------------
>>> --
>>> 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.
>>>
>>>
>>
>> --
>> 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.
>>
>>
>>
>> --
>> 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.
>>
>>
>
> --
> 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.
>
>
> --
> 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.
>
>

--
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 ...

Replies:

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.