I have a table of 2 columns
(Date, Text). I am getting data from the
Text column according to the
Date using a query like this:
SELECT Text FROM MyTable WHERE Date>= @userDate;
This works, except when
@userDate is bigger than the most recent
MyTable. In this case it returns nothing but I need it to return the
Text for the most recent Date.
I have to change my query to use the smaller one of
MAX(Date). Any ideas how to do it?