|
-- [ Picked text/plain from multipart/alternative ] Booth the query time is the sum of all queries. agreed this is simpler for the end user to understand and do. Glenn At 12:34 PM 10/21/2001 -0400, Booth Martin wrote: >Two queries is probably the easiest and most straight forward way. Write >one query that selects the records desired (either the customers desired, or >the date ranges desired) and then write another query against that output >file to get the other datum needed (either the sales records or the customer >records). > >Advantages of this method is that it is easily taught to your query user >base and it is not the hog for performance some of the monolithic queries >can be, > > >--------------------------------------------------------- >Booth Martin http://www.MartinVT.com >Booth@MartinVT.com >--------------------------------------------------------- >-------Original Message------- >From: midrange-l@midrange.com >Date: Sunday, October 21, 2001 07:43:12 AM >To: midrange-l@midrange.com >Subject: Re: query question >I dont think query is what you want here. I think you really need a >sort/merge. How about using OPNQRYF instead > >>> Doug Johnson <djohnson@Univbkstr.com> 10/19/01 02:40PM >>> >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 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.