Arg81
Well-known member
Before I start, I have mentioned this before, but I didn't really get much help, no offense to those who did reply, but it wasn't what I was wanting to achieve.
I have a decimal field in one table that is used to represent the time spent on a request in hours, i.e. 0.25, 0.5, 0.75, 1, 1.25 etc etc.
I am trying to do a sum. Basically the relationship is linked on two fields to the master table.
The first sum needs to be the sum of all the time spend on Field1. The second sum needs to be the sum of the time spent only on Field2 for each Field1.
I.E.
Request No | Revision No | Time Spent | EmployeeID
1 -------------- 1 ---------- 0.5 --------- 16
1 -------------- 1 ---------- 0.75 -------- 5
1 -------------- 2 ---------- 0.25 -------- 12
1 -------------- 2 ---------- 0.5 --------- 2
So basically, the sum of the Time Spent on Request No 1 would be 2 hours, the sum for Request 1 Revision 1 would be 1.25 hours, and Request 1 Revision 2 would be 0.75 hours.
I can get this working by creating SQL and linking into the database, but that then relies on the user having to submit everytime they add a row to the Time table. I would like this to be real time if possible, so in a sense summing the data straight out of the DataTables.
Thanks for any help.
Luke
I have a decimal field in one table that is used to represent the time spent on a request in hours, i.e. 0.25, 0.5, 0.75, 1, 1.25 etc etc.
I am trying to do a sum. Basically the relationship is linked on two fields to the master table.
The first sum needs to be the sum of all the time spend on Field1. The second sum needs to be the sum of the time spent only on Field2 for each Field1.
I.E.
Request No | Revision No | Time Spent | EmployeeID
1 -------------- 1 ---------- 0.5 --------- 16
1 -------------- 1 ---------- 0.75 -------- 5
1 -------------- 2 ---------- 0.25 -------- 12
1 -------------- 2 ---------- 0.5 --------- 2
So basically, the sum of the Time Spent on Request No 1 would be 2 hours, the sum for Request 1 Revision 1 would be 1.25 hours, and Request 1 Revision 2 would be 0.75 hours.
I can get this working by creating SQL and linking into the database, but that then relies on the user having to submit everytime they add a row to the Time table. I would like this to be real time if possible, so in a sense summing the data straight out of the DataTables.
Thanks for any help.
Luke
Last edited: