Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

date sort two column

Status
Not open for further replies.

NTrade

Computer
Jan 10, 2007
7
0
0
US
Have an sql puzzle that is so classical it could be text book.

Column1 is Date
Column2 is Amended Date

There is always an entry in Column1 - there is occasionally an entry in Column2.

My query needs to return the records in chronological order - and the Amended Date is to be used when it exists in terms of that record's location in the chronological order. (One can presume that the Amended Date is always correct and doesn't need to be compared with its own original date.)

Am going to nick away at some sql statements and would welcome input from anyone out there that likes an sql puzzle...thanks in advance ntc
 
Replies continue below

Recommended for you

Status
Not open for further replies.
Back
Top