I have 5 records, each with a different expiration date:
20010601
20020520
20030316
20041230
20051007
I have to find the one record where the comparenumber is the highest value without exceeding the comparenumber
Example:
Comparenumber (from another table) = 2050206
I need to select only 20041230 since it is the highest value possible.
In my current query I'm selecting all records below 20051007 instead of 20041230 only.
Thank you.
20010601
20020520
20030316
20041230
20051007
I have to find the one record where the comparenumber is the highest value without exceeding the comparenumber
Example:
Comparenumber (from another table) = 2050206
I need to select only 20041230 since it is the highest value possible.
In my current query I'm selecting all records below 20051007 instead of 20041230 only.
Thank you.