home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!usc!sdd.hp.com!spool.mu.edu!umn.edu!dell32.ortta.umn.edu!durai
- From: durai@ortta.umn.edu (Durai Venkatasubramanian)
- Subject: Re: Pls help: algorithm wanted (xbase, pref foxpro)
- Message-ID: <durai.107.726186277@ortta.umn.edu>
- Lines: 50
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: dell32.ortta.umn.edu
- Organization: U of Mn
- References: <1993Jan3.103406.28479@pegasus.com> <1993Jan4.201319.9088@almserv.uucp>
- Date: Mon, 4 Jan 1993 22:24:37 GMT
- Lines: 50
-
- In article <1993Jan4.201319.9088@almserv.uucp> g9utxu@fnma.COM (Tanin Uthayanaka) writes:
-
- >I beleive I made the same mistake on my first version, then I corrected it on my
- >second version with one bug which no one has found yet.
-
-
- I really appreciate the time and effort Tanin and Tom have taken to help me (
- and others, probably) out. I am yet to translate(!) Tom's code to foxpro.
-
- Just to set the records straight, I would like to share the results of
- running Tanin's code. No offence please. I am not here to point out bugs
- or inefficient coding, but just to acknowledge the fact about how the code
- works.
-
- Records in my rate.dbf
-
- Rate Start_date End_date Status
- 01 07/01/91 06/30/93 Provisional
- 02 07/01/92 06/30/93 Final
- 03 07/01/93 12/31/93 Provisional
-
-
- Test data 1: dstart = 01/01/92, dend = 01/06/93
-
- Results: 01/01/92 - 12/31/93 Provisional
- 01/01/94 - 01/06/93 Uncovered
-
- whereas, the results should have been
- 01/01/92 - 06/30/92 Provisional
- 07/01/92 - 01/06/93 Final
-
- Test data 2: dstart = 07/01/91, dend = 12/31/93
-
- Results: 07/01/91 - 06/03/93 Provisional
- 07/01/92 - 06/30/93 Final
- 07/01/93 - 12/31/93 Provisional
- 01/01/94 - 12/31/93 Uncovered
-
- whereas, the last line should not have even appeared, forget the
- error (12/31/93). I amended the code a little bit, and eliminated
- the last line.
-
- The code works fine as long as the records in the database match the dstart
- and dend variables. Most of the times, the contract periods either start
- before, or end after, the rate agreement dates. These algorithms tend to
- ignore the fact.
-
- Anyway, I am really thankful to Tanin and Tom, for giving me a sense of
- direction as to how to approach this issue.
-
-