Based on a date, I must search a table for a value from another column, but the date is not necessarily exact, it can be within a range or be greater than the last one in the table.
For example
VUT - Table
|Since |Value|
| 19/02/2014 | 127 |
| 25/02/2015 | 150 |
| 11/02/2016 | 177 |
| 25/02/2017 | 300 |
Depending on the date of a transaction, I must take the value of the โValueโ field and perform a calculation, but the date of the transaction can be anyone and not necessarily the one specified in the table, each record establishes a range and must take the "Value "depending on where you are
I would appreciate your comments.
Solved! Go to Solution.
Have to change MIX to MAX on the SELECT โฆ the list for this SELECT takes the rows where Dates ar greater and equal to Since โฆ but the closest Since is the MAX
User | Count |
---|---|
43 | |
30 | |
24 | |
23 | |
13 |