Hi,
i think the title is a little cryptic, here's what i want to do...
i have in my tabel two datetime fields. Now i want to select the rows where the largest (ie the most far in the future) date is larger than 'today'
few examples: (today is 6-22)
date1: null, date2: null : no match, all lower than now
date1: null, date2: 5-31: no match, all lower than now
date1: null, date2: 6-23: match, 6-23 is larger than now
date1: 5-31, date2: 7-23: match, 6-23 is larger than now
date1: 7-21, date2: 1-23: match, 7-21 is larger than now
date1: 7-21, date2: null: match, 7-21 is larger than now
so in sort of pseudo code:
select * from table where (max(date2, date2)) > now
Regards, Michel