|
boothm@earth.goddard.edu wrote: > > Here's the issue: > 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? Bear with me, I'm doing this from memory. qry/400 files are: master detail detail (third file-detail again - yes you can do this.) link option 2 linked by key fields t01.cusid eq t02.cusid t01.cusid eq t03.cusid select fields - doesn't matter - leave it alone select records t02.amt gt 0 or t03.amt lt 0 sort by t01.cusid or t01.cusname if you prefer. report layout - headers for t02.amt = debits t03.amt = credits summary functions totals on t02.amt and t03.amt control level breaks "1" on both t01.cusid and cusname suppress level 0 (final total) summaries. report type = 2 - summary only and there you have it!!!!!! the report isn't very pretty - it'll look something like this. customer name credit debit xxxxx xxxxxxxxxxxxxxx total: xxxxxxx total: xxxxxxxx xxxxx xxxxxxxxxxxxxxxx total: xxxxxxx total: xxxxxxxx > We've got a $.25 bet riding on this... I should get at least a dime of that!!!! hope this helps, rick * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 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.