
May 1st, 2004, 12:10 PM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
How do I return a value from one column based on a range from another column?
What I have is an "effective_date" column and a "tax_rate" column. I need to return a tax rate for a date within the effective date range. For example:
effective_date tax_rate
2002-01-01 0.010
2003-01-01 0.015
The date I am looking for is 2002-04-01. What I need is for the query to return 0.010 because the effective tax rate on that date would be 0.010. The problem is that I cannot figure out how to scan the table and have the query recognize that 2002-04-01 is after 2002-01-01, but before 2003-01-01. Any help would be greatly apprectiated. Thanks.
|