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



You slightly misunderstood my answer. If you indeed want your output as your first example, you just can't do it - that is the output of a report writer. SQL is only a data access program, it doesn't do what you want.

Bill


Antonio Fernandez-Vicenti wrote:
Bill, thanks for your answer, but I think it's not what I meant:
I'd like to get something like this
        01          AA        field3
        01          AA        field3
        01          AA        field3
          Subtotal01AA   xxxxx
        01          BB        field3
        01          BB        field3
        01          BB        field3
          Subtotal01BB   yyyyy
        05          XX       field3
        05          XX       field3
        05          XX       field3
          Subtotal05XX  zzzzzz
           Final TOTAL   TTTT

with Subtotals intermixed with detail lines, plus a final Grand Total

whereas the code you suggested  I think will yield something like

01 AA field3 xxxxx 01 AA field3 xxxxx
        01          AA        field3    xxxxx
        01          BB        field3    yyyyy
        01          BB        field3    yyyyy
        01          BB        field3    yyyyy
        05          XX       field3     zzzzz
        05          XX       field3     zzzzz
        05          XX       field3     zzzzz
and without the Final Total.

Am I wrong or did I misunderstand your suggestion?
Thanks in any case!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.