I am trying to write a query that will calculate the difference between the start and end date of a record, and then sum the results.
The problem is that I want to ignore portions of the periods encountered if the overhang, so for January 06, if a record has start 15/12/05 and end 06/01/06 the answer would be 6 days.
Is there anyway this logic can be built into a query? I have looked at using a case statement but this does not seem appropriate.
The problem is that I want to ignore portions of the periods encountered if the overhang, so for January 06, if a record has start 15/12/05 and end 06/01/06 the answer would be 6 days.
Is there anyway this logic can be built into a query? I have looked at using a case statement but this does not seem appropriate.