home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8871 < prev    next >
Encoding:
Text File  |  1993-01-06  |  2.4 KB  |  52 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: Couple of questions about Paradox Query and Reports
  5. Message-ID: <C0GIE9.D6r@ccu.umanitoba.ca>
  6. Sender: news@ccu.umanitoba.ca
  7. Nntp-Posting-Host: ccu.umanitoba.ca
  8. Organization: University of Manitoba, Winnipeg, Canada
  9. Date: Wed, 6 Jan 1993 23:54:09 GMT
  10. Lines: 40
  11.  
  12.  
  13. Hello,
  14. I am having trouble with achieving a few results in Paradox query and report.
  15. I would appreciate any help on it.
  16.  
  17. 1. Pertaining to Query...
  18. I have a table giving sale figures. There is a "date of sale" and customer
  19. field in every record--along with the "sale" figure (in dollars). For a report
  20. I want to know the total sales for every customer for last month and same month
  21. in last year (for comparison purposes, so e.g. for Dec-1992 and Dec-1991). I
  22. link Sales table with Customer table using example elements. Right now I am 
  23. using two queries--one to find "calc sum" for 'sales' for Dec-1992 and other 
  24. for finding "calc sum" for 'sales' for Dec-1991. But I want to do it in one
  25. query so that Paradox finds sum of sales (calc sum) for a given date range
  26. and in the same query finds sum of sales (calc sum--in the same field!) for
  27. another date range and displays both results in different columns.
  28. How can I do that. I tried to work along the example
  29. query in Paradox users manual pp.77, Example 5-28. I do get results in two
  30. columns but for some weird reason every sale figure gets added up TWICE. i.e
  31. if the total for customer 100 is $1000, it will show up to be $2000. I would
  32. really appreciate any help I can get on this.
  33.  
  34. 2. Pertainig to Report...
  35. How can I find sum of the calculated fields? I mean how do I refer to a
  36. calculated field in another calculated field? I have two columns of 
  37. sales figures in the report. First column is sale figures for this month
  38. and second column is sales figures for last year. There is a third column 
  39. that contains calculated fields and lists the difference in figures in 
  40. each of row of previous tow columns ([first col] - [second col]). Now
  41. as the end of report I want the sum of each column. Each column whose
  42. fields came from a table can be easily summed up using summary function but
  43. how can I add up a column of calculated fields (as the 'difference' col
  44. described above).
  45.  
  46. I thank you for your help in advance.
  47.  
  48. regards,
  49. --nasir
  50. umnoor@ccu.umanitoba.ca
  51.  
  52.