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



In Query/400, you cannot have one column with data from two different files (I
am referring to the DATE and AMOUNT columns). You may want to:


a) ONE-SHOT REQUEST - Still use query to read your Purch File and write the
desired data into a Work File.
     Use query to read now your Payments data and write to the same work file.
     Use a third query to read/print the data in the way you want it.


b) PERMANENT TOOL FOR USERS - Use a program.  Solves everything on one shot.


In any approach, good luck!
Peter Vidal




                    Doug Johnson
                    <djohnson@Univbkstr        To:     
"'midrange-l@midrange.com'"
                    .com>                      <midrange-l@midrange.com>
                    Sent by:                   cc:
                    midrange-l-admin@mi        Subject:     query question
                    drange.com


                    10/19/01 02:40 PM
                    Please respond to
                    midrange-l






Greetings,

I am trying to write a query that will pull data from several files.  They
do have a common field that I will use for the selection, but joining the
files on that field of course results in extraneous records in the output. I
need some way to merge the data selected instead and then sort it by
customer and date.

This is what we are looking for as output for example:

charge account activity sorted by account # and date

Customer number           Date1          Item1          Purchase amount
                     Date1               Item2          Purchase amount
                     Date2               Item1          Purchase Amount
                     Date3                         Payment amount
                     Date4               Item1          Purchase amount
                     Date5                         Payment Amount


Purchases and payment history are separate files with different fields and
formats.

Am I missing the obvious here or is it not possible to do this with query?

Thanks,

-doug


************************************************
DOUGLAS JOHNSON
System Administrator
The University Book Store
711 State Street
Madison, WI 53703

djohnson@univbkstr.com
608-257-3784
608-257-9479(fax)

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







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.