Hej:
I have a problem with comparations of time intervals:
For example my data is:
Table1 (USER DATA)
REG DAY TIMEIN TIMEOUT
1 1 O7:30 16:00
2 7 07:30 16:30
3 1 07:30 16:00
4 2 07:00 16:30
5 3 08:00 15:00
6 7 17:00 19:00
Table2 (CONTROL DATA)
REG DAY TIMEIN TIMEOUT PORCENT
1 1 07:30 16:00 25%
2 1 16:01 20:00 50%
3 7 07:00 16:00 35%
4 7 16:01 20:00 75%
By hand, for Reg 1 of Table1 correspond to Reg 1 of Table 2, Reg 2 of Table1 correspond Reg 3 of Table2 (for 07:30 to 16:00) and Reg 4 of Table2 (for 16:00 to 16:30), that give me the diff of time and porcentage to apply.
Is posibble make a query for get de correspond reg of Table2 by values of Table1, showing the diff of hours.
The problematic is get de correct porcent to apply to data of Table1 from Table2.
Any idea for a query or function for that.
Thanks in advance.
I have a problem with comparations of time intervals:
For example my data is:
Table1 (USER DATA)
REG DAY TIMEIN TIMEOUT
1 1 O7:30 16:00
2 7 07:30 16:30
3 1 07:30 16:00
4 2 07:00 16:30
5 3 08:00 15:00
6 7 17:00 19:00
Table2 (CONTROL DATA)
REG DAY TIMEIN TIMEOUT PORCENT
1 1 07:30 16:00 25%
2 1 16:01 20:00 50%
3 7 07:00 16:00 35%
4 7 16:01 20:00 75%
By hand, for Reg 1 of Table1 correspond to Reg 1 of Table 2, Reg 2 of Table1 correspond Reg 3 of Table2 (for 07:30 to 16:00) and Reg 4 of Table2 (for 16:00 to 16:30), that give me the diff of time and porcentage to apply.
Is posibble make a query for get de correspond reg of Table2 by values of Table1, showing the diff of hours.
The problematic is get de correct porcent to apply to data of Table1 from Table2.
Any idea for a query or function for that.
Thanks in advance.