Challenging Thinking

G

Guest

I have a input table as follows:
UserName Action ActionTime FirstLogOnTime LastLogOffTime
User1 Logon 10:04:24 10:00 19:00
User2 Logon 11:07:04 11:00 20:00
User1 Logoff 11:45:34 10:00 19:00
User1 Logon 11:57:55 10:00 19:00
User2 Logoff 12:02:06 11:00 20:00
User2 Logon 12:17:45 11:00 20:00
User1 Logoff 18:53:34 10:00 19:00
User2 Logoff 19:52:34 11:00 20:00
.... ... .... ...
...

I want a output table as follows:
UserName Action ActionTime FirstLogOnTime LastLogOffTime
TimeDiff
User1 Logon 10:04:24 10:00 19:00
04:24
User1 Logoff 18:53:34 10:00 19:00
-06:26
User2 Logon 11:07:04 11:00 20:00
07:04
User2 Logoff 19:52:34 11:00 20:00
-07:26

Explain about tables:
There are more than thousand users to log on and off in company's
telephhone system based on their scheduled first logon and last logoff times.
ActionTime field records actual log time including break and lunch time and
other kinds of time.

I want to compare User1's first logon time with actual first logon time,
last logoff time with actual last logoff time only. If user1 logs on later
than 3 minutes after a scheduled FirstLogOnTime or logs off earlier than 3
minutes ahead of LastLogOffTime, output table must caputure these
inconsistent users only. No comparison about break time and other kinds of
time are not necessary at this time. So on User2 and User3. ........


Please, help me with step by step query/programmng instructions.
Really appreciate your helps!!!!

Explain about table:
There are more than thousand users to log on and off in company's
telephhone system based on their scheduled first logon and last logoff times.
ActionTimr field records actual log time including break and lunch time and
other kinds of time.

I want to compare User1's first logon time with actual first logon time,
last logoff time with actual last logoff time. If user1 logs on later than 10
minutes after a scheduled FirstLogOnTime or logs off earlier than 10 minutes
ahead of LastLogOffTime, I need to record these discrepancies. I need a table
that caputures these inconsistent users. No comparison about break time and
other kinds of time are not necessary at this time. So on User2 and User3.
.........
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Challenging? 6
Expression 1
Expression 1
Count records in 10 minute time period 4
Lost in time! 5
How to interpret CPUZ spd readouts? 5
Numbers from query concactinate when added in Report 1
Break Calculation 1

Top