I am trying to write an effective query to find the first date that is => than the base date I am comparing it to.
Being relatively new to SQL I do not understand if there is a more direct way of getting to the value rather than having to first find the dates that are => (via subquery?)and then calculate each and every comparison and then use the (MIN) value on the results??
Compare Dates field could be any number of values that must be compared.
For example:
Base Date Compare Dates
1/1/2008 10/1/2007
11/12/2007
12/23/2007
1/3/2008
2/23/2008
3/1/2008
Desired Result:
Base Date 1/1/2008 Compare Dates 1/3/2008
Thanks in advance for any assistance!
Being relatively new to SQL I do not understand if there is a more direct way of getting to the value rather than having to first find the dates that are => (via subquery?)and then calculate each and every comparison and then use the (MIN) value on the results??
Compare Dates field could be any number of values that must be compared.
For example:
Base Date Compare Dates
1/1/2008 10/1/2007
11/12/2007
12/23/2007
1/3/2008
2/23/2008
3/1/2008
Desired Result:
Base Date 1/1/2008 Compare Dates 1/3/2008
Thanks in advance for any assistance!