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

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!usc!sdd.hp.com!spool.mu.edu!umn.edu!dell32.ortta.umn.edu!durai
  3. From: durai@ortta.umn.edu (Durai Venkatasubramanian)
  4. Subject: Re: Pls help: algorithm wanted (xbase, pref foxpro)
  5. Message-ID: <durai.107.726186277@ortta.umn.edu>
  6. Lines: 50
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: dell32.ortta.umn.edu
  9. Organization: U of Mn
  10. References: <1993Jan3.103406.28479@pegasus.com> <1993Jan4.201319.9088@almserv.uucp>
  11. Date: Mon, 4 Jan 1993 22:24:37 GMT
  12. Lines: 50
  13.  
  14. In article <1993Jan4.201319.9088@almserv.uucp> g9utxu@fnma.COM (Tanin Uthayanaka) writes:
  15.  
  16. >I beleive I made the same mistake on my first version, then I corrected it on my 
  17. >second version with one bug which no one has found yet.
  18.  
  19.  
  20. I really appreciate the time and effort Tanin and Tom have taken to help me (
  21. and others, probably) out.  I am yet to translate(!)  Tom's code to foxpro.
  22.  
  23. Just to set the records straight, I would like to share the results of 
  24. running Tanin's code.  No offence please.   I am not here to point out bugs 
  25. or inefficient coding, but just to acknowledge the fact about how the code 
  26. works.  
  27.  
  28. Records in my rate.dbf
  29.  
  30. Rate  Start_date   End_date   Status
  31. 01    07/01/91     06/30/93   Provisional
  32. 02    07/01/92     06/30/93   Final
  33. 03    07/01/93     12/31/93   Provisional
  34.  
  35.  
  36. Test data 1:  dstart = 01/01/92, dend = 01/06/93
  37.  
  38. Results:  01/01/92 - 12/31/93  Provisional
  39.           01/01/94 - 01/06/93  Uncovered
  40.  
  41. whereas, the results should have been
  42.           01/01/92 - 06/30/92  Provisional
  43.           07/01/92 - 01/06/93  Final
  44.  
  45. Test data 2: dstart = 07/01/91, dend = 12/31/93
  46.  
  47. Results: 07/01/91 - 06/03/93  Provisional
  48.          07/01/92 - 06/30/93  Final
  49.          07/01/93 - 12/31/93  Provisional
  50.          01/01/94 - 12/31/93  Uncovered
  51.  
  52. whereas, the last line should not have even appeared, forget the 
  53. error (12/31/93).  I amended the code a little bit, and eliminated 
  54. the last line.  
  55.  
  56. The code works fine as long as the records in the database match the dstart 
  57. and dend variables.  Most of the times, the contract periods either start 
  58. before, or end after, the rate agreement dates.  These algorithms tend to 
  59. ignore the fact.
  60.  
  61. Anyway, I am really thankful to Tanin and Tom, for giving me a sense of 
  62. direction as to how to approach this issue.
  63.  
  64.