is there a date function the can return from a list of dates the next date which is the first one greater than some "input date"
example
table A input date = 2002-01-02 23:59:59.000
2001-08-22 23:59:59.000
2001-09-02 23:59:59.000
2002-01-02 23:59:59.000
2002-02-04 23:59:59.000
2002-03-19 23:59:59.000
2002-04-31 23:59:59.000
this function would return 2002-02-04 23:59:59.000
because it is the first date greater than input date
example
table A input date = 2002-01-02 23:59:59.000
2001-08-22 23:59:59.000
2001-09-02 23:59:59.000
2002-01-02 23:59:59.000
2002-02-04 23:59:59.000
2002-03-19 23:59:59.000
2002-04-31 23:59:59.000
this function would return 2002-02-04 23:59:59.000
because it is the first date greater than input date