I am trying to calculate the date difference between each service engineer visit.
My Base data is as follows...
Service Process Serial Number MaxOfVisit End Date Visit Date Difference
0027714622 1104503043 11/01/2013 0
0028194966 1104503043 27/02/2013 0
0028380800 1104503043 14/03/2013 0
0028397729 1104503043 20/03/2013 0
0028700746 1104503043 17/04/2013 0
I want the Visit Date Difference field to calculate the difference between each visit. The first date difference needs to be 27/02/2013 - 11/01/2013 = 16 the next one needs to be 14/03/2013 - 27/02/2013 etc etc.
I have very little sql knowledge and am really stuck. I hope I have entered everything required above and would really appreciate any help. :banghead:
Thanks very much.
My Base data is as follows...
Service Process Serial Number MaxOfVisit End Date Visit Date Difference
0027714622 1104503043 11/01/2013 0
0028194966 1104503043 27/02/2013 0
0028380800 1104503043 14/03/2013 0
0028397729 1104503043 20/03/2013 0
0028700746 1104503043 17/04/2013 0
I want the Visit Date Difference field to calculate the difference between each visit. The first date difference needs to be 27/02/2013 - 11/01/2013 = 16 the next one needs to be 14/03/2013 - 27/02/2013 etc etc.
I have very little sql knowledge and am really stuck. I hope I have entered everything required above and would really appreciate any help. :banghead:
Thanks very much.