You might want to consider something like:

group by a,b,c
with rollup
order by a,b,c

and see if that get you close.

Also investigate grouping sets. Have a look at this article by Michael Sansoterra from the Four Hundred Guru at IT Jungle:

http://www.itjungle.com/fhg/fhg031109-story02.html

Sam

On 12/26/2013 5:59 PM, Hoteltravelfundotcom wrote:
HI I have been unable to duplicate this query.
It uses 5 files it matches from the orderhistory file to customer, and
shipping, invoice history and address files.
OHENT# EQ ADENT#
OHSFX# EQ ADSFX#
OHORD# EQ IDORD#
OHENT# EQ ACENT#
OHSFX# EQ ACSSF#

has some record selects and sorting, no problems so far. Does totals on qty
shipped and $shipped.

Does break levels on 9 fields. this is the part I cannot translate. then
puts the data to a temp file.

I am not getting the same number of records no matter what. am sure the
issue is how to code this Break in SQL.


This thread ...


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

This mailing list archive is Copyright 1997-2019 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].