I have a result set which returns results like this,
ID Q_Number Q_CycleID INC_Date1 INC_Date2 OUT_Date1 OUT_Date2
8322445 Q8322445 17921439 2014-03-06 00:00:00 2014-05-14 13:31:00 NULL NULL 8322445 Q8322445 17614525 NULL NULL 2014-05-16 09:22:00 2014-05-20 07:29:00
I want to get the date difference between all the columns. It works for difference between INC_Date 2 and INC_Date1, OUT_Date2 and OUT_Date1 but it does not work for OUT_Date1 - INC_Date2.
How can I do this?