home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8909 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.4 KB  |  33 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!newsflash.concordia.ca!mizar.cc.umanitoba.ca!umnoor
  3. From: umnoor@ccu.umanitoba.ca (Nasir Ahmed Noor)
  4. Subject: A question about Paradox Query
  5. Message-ID: <C0IG59.KvL@ccu.umanitoba.ca>
  6. Sender: news@ccu.umanitoba.ca
  7. Nntp-Posting-Host: asimov.cc.umanitoba.ca
  8. Organization: University of Manitoba, Winnipeg, Canada
  9. Date: Fri, 8 Jan 1993 01:00:44 GMT
  10. Lines: 21
  11.  
  12.  
  13. Hi,
  14. I have to do a query on two tables. One is sales that lists sales for a given
  15. month by date and other is customer. I want to find out sales for  customers
  16. for the last month and for the same month from last year (e.g. Jan-93 and
  17. Jan-92). I link customer table with sales using example elements. I want the
  18. results of query to show up in different columns, i.e., sales for last month
  19. should be in different column and for the same month from last year in 
  20. different column. How can I do that. I tried to do it as following but it
  21. gives me wrong results. I have noticed that every sale figure gets added up
  22. more than once in result. Following is my query....
  23. Customer:   Field [Customer #]
  24.             Check <example element>A!,<example element>B!
  25.  
  26. Sales:   Field [Date]                  Field [Customer #]     Field [Sale]
  27.          >=date1,<=date1a              <example element>A     calc sum
  28.          >=date2,<=date2a              <example element>B     calc sum
  29.  
  30. I would appreciate your help,
  31. --nasir
  32. umnoor@ccu.umanitoba.ca
  33.