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


  • Subject: Re: A query question
  • From: DAsmussen@xxxxxxx
  • Date: Fri, 6 Jun 1997 19:15:05 -0400 (EDT)

Booth,

In a message dated 97-06-06 08:49:00 EDT, you write:

> We have two files.  
>  One is the Name master file.
>  The other is the Detail file.
>  A field in the Detail file has both debits (as a +) and credits (as a -),
>  Also the Detail record has a field that can be 00 (00 is always a debit),
>  or the field can be any number 01 thru 99 (and never a debit).
>  
>  I'm sure you can already see the question:  How do we write a query
>  showing the customer's name. his total debits, and also his total credits.

>  We know the difference is usually near 0.00, but we'd like to know the
>  business volume he's done.
>  
>  Can this be done with Query/400?  
>  We've got a $.25 bet riding on this...

I assume that you already have a query that does this, but cannot break out
the debits and credits.  Write a query that builds an outfile for the
positive values from the "detail file".  Write another that builds another
outfile for the negative values.  You might want to create a "user-defined"
value for each called "Debit" in query one and "Credit" in query two that is
equal to "Amount".

Write a CL that runs these queries, followed by your main one that you have
now modified to use the outfiles from the previous two instead of Detail.
 That should work, where's my nickle :-)?

One Solution,

Dean Asmussen
Enterprise Systems Consulting, Inc.
Fuquay-Varina, NC  USA
E-Mail:  DAsmussen@AOL.COM

"In America, anyone can become President.  That's one of the risks you take."
-- Adlai Stephenson
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.