Hi,
I'm not sure which forum I should post this in, but it has little relevance to math, or when it's under comparison.
I have a sample record as such
[part no] [start_date] [end_date] [return_value]
part123 2006-01-01 2006-12-31 A
part123 2006-02-01 2006-03-31 B
part123 2006-02-20 2006-08-01 C
part123 2006-03-01 2007-01-01 D
I know, if my date is:
1) 2006-01-01, returns A, not B, C, D
2) 2007-01-01, returns D, not A, B, C
3) 2006-02-05, returns A, B, not C, D
4) 2006-06-04, returns A, C, D, not B
Now, the thing is, for return of 1) and 2), there is only a single value returned.
As for return of 3) and 4), it gave me A & B and A, C, & D respectively. How do I further decide which is the VALID date range and return me the proper return_value?
Is there an algorithm to decide this?
