Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get logon and logoff data on the same record

Status
Not open for further replies.

kernal

Technical User
Feb 27, 2001
415
US
I have a table and here is an example of what is in the table (I had a query and I accidently deleted it and now I can't remember how I did it).

id computer user operation location created_at
1 Bldg_Lab1_22 001 logon Bldg_1 2010-03-17 15:57:40
2 Bldg_Lab1_19 555 logon Bldg_1 2010-03-17 15:59:42
3 Bldg_Lab1_20 658 logon Bldg_1 2010-03-17 16:02:27
4 Bldg_Lab1_20 658 logoff Bldg_1 2010-03-17 16:09:10
5 Bldg_Lab1_19 555 logoff Bldg_1 2010-03-17 16:10:13
6 Bldg_Lab1_22 001 logoff Bldg_1 2010-03-17 16:24:32
7 Bldg_Lab2_08 854 logon Bldg_2 2010-03-17 16:50:20
8 Bldg_Lab2_08 854 logoff Bldg_2 2010-03-17 19:20:13

id 1 (id is an auto incremented field) is the logon for user 001 and id 6 is the logoff for the same user so:

user computer location operation created_at operation created_at
001 Bldg_Lab1_22 Bldg_1 logon 2010-03-17 15:57:40 logoff 2010-03-17 16:24:32

id 2 is the logon for user 555 and id 5 is the logoff for the same user so:

user computer location operation created_at operation created_at
555 Bldg_Lab1_19 Bldg_1 logon 2010-03-17 15:59:42 logoff 2010-03-17 16:10:13
and so on

I have data from March 2010 to the end of the 2010 year.

Help is appreciated.

 
I did a search on my computer and found a txt file of it. Yippee!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top