How would one write a query that would order a set of records based upon the either
a)the latest of two dates within each record and given the possibility one datefield may be blank/null or
b) the date of the field that was not null
ordered by date
Record 1: field1 field2 12/12/00 3/3/01
Record 2: field1 field2 11/11/00 2/2/01
Record 3: field1 field2 12/15/00 null
Need Records returned as
Record 3
Record 2
Record 1
a)the latest of two dates within each record and given the possibility one datefield may be blank/null or
b) the date of the field that was not null
ordered by date
Record 1: field1 field2 12/12/00 3/3/01
Record 2: field1 field2 11/11/00 2/2/01
Record 3: field1 field2 12/15/00 null
Need Records returned as
Record 3
Record 2
Record 1