I have created a query that calculates the number of days between 2 dates. Date1 and Date2 this uses the following:
No of Days: [Date2]-[Date1]
Problem 1:
What I want next is to create another column that does a running total of the No of Days column
Problem 2:
Now I need to take the results from Problem one and take the number away from 20.
Problem 3:
I also need the totals to group by another column called name. So the results from problem one would only calulate the results for each name for example name1 has 3 records I would only want them calculated for that name.
Name2 has 10 records so it would calculate the results based on those 10 records.
The Result:
The results should look like below.
Date1 Date2 No of Days Days Taken Days Left
1/9/2008 7/9/2008 6 6 14
1/9/2008 7/9/2008 6 12 8
1/9/2008 7/9/2008 6 18 2
Thanks in advance
No of Days: [Date2]-[Date1]
Problem 1:
What I want next is to create another column that does a running total of the No of Days column
Problem 2:
Now I need to take the results from Problem one and take the number away from 20.
Problem 3:
I also need the totals to group by another column called name. So the results from problem one would only calulate the results for each name for example name1 has 3 records I would only want them calculated for that name.
Name2 has 10 records so it would calculate the results based on those 10 records.
The Result:
The results should look like below.
Date1 Date2 No of Days Days Taken Days Left
1/9/2008 7/9/2008 6 6 14
1/9/2008 7/9/2008 6 12 8
1/9/2008 7/9/2008 6 18 2
Thanks in advance
Last edited: