D
DawnTreader
Hello All
i have a table that i used to store each login and log out of each user on a
seperate record. so it would look like this:
LoginLogId DateLoggedIn EmployeeId Type SystemModule
32886 2009/01/27 7:47:59 AM 228 Out Server
32885 2009/01/27 7:45:50 AM 228 Out Server
32884 2009/01/27 7:45:39 AM 228 In Server
32883 2009/01/27 7:38:29 AM 323 In Server
32882 2009/01/27 7:29:08 AM 311 Out Client DB
32881 2009/01/27 6:10:06 AM 275 Out Client DB
32880 2009/01/27 6:07:08 AM 311 In Client DB
32879 2009/01/27 6:00:02 AM 315 Out Client DB
32878 2009/01/27 5:58:25 AM 315 In Client DB
32877 2009/01/27 5:27:22 AM 275 In Client DB
32876 2009/01/27 4:18:03 AM 334 Out Client DB
32875 2009/01/27 3:50:48 AM 345 Out Client DB
32874 2009/01/27 3:32:31 AM 334 In Client DB
32873 2009/01/27 3:30:15 AM 334 Out Client DB
now i want to rearrange that and make it happen like this:
LoginId EmpId Type SystemModule DateIn DateOut
32667 228 In and Out Server 27/01/2009 01:53:32 PM 27/01/2009 01:53:37 PM
32666 228 In and Out Server 27/01/2009 11:21:50 AM 27/01/2009 11:22:08 AM
32665 228 In Server 27/01/2009 11:18:43 AM
32664 228 In and Out Server 27/01/2009 11:15:33 AM 27/01/2009 11:15:37 AM
32663 228 In Server 27/01/2009 11:15:01 AM
32662 228 In and Out Server 27/01/2009 11:14:15 AM 27/01/2009 11:14:24 AM
32661 228 In Server 27/01/2009 11:11:47 AM 27/01/2009 11:12:05 AM
sorry for the crowdedness, but i think you get the idea. the question is how
can i take the old data and convert it to the way the new data is layed out?
basically i need to take a stack of 2 records and put it on one line as one
record. all the previous data is in pairs, kinda.
the problem is if someone crashed out of the database there may only be an
"In".
the reason for the change is to allow me to use one line per login and out
and to calculate the time logged in easier than trying to find the 2 records
that matched.
as always, any help or ideas are greatly welcomed!
i have a table that i used to store each login and log out of each user on a
seperate record. so it would look like this:
LoginLogId DateLoggedIn EmployeeId Type SystemModule
32886 2009/01/27 7:47:59 AM 228 Out Server
32885 2009/01/27 7:45:50 AM 228 Out Server
32884 2009/01/27 7:45:39 AM 228 In Server
32883 2009/01/27 7:38:29 AM 323 In Server
32882 2009/01/27 7:29:08 AM 311 Out Client DB
32881 2009/01/27 6:10:06 AM 275 Out Client DB
32880 2009/01/27 6:07:08 AM 311 In Client DB
32879 2009/01/27 6:00:02 AM 315 Out Client DB
32878 2009/01/27 5:58:25 AM 315 In Client DB
32877 2009/01/27 5:27:22 AM 275 In Client DB
32876 2009/01/27 4:18:03 AM 334 Out Client DB
32875 2009/01/27 3:50:48 AM 345 Out Client DB
32874 2009/01/27 3:32:31 AM 334 In Client DB
32873 2009/01/27 3:30:15 AM 334 Out Client DB
now i want to rearrange that and make it happen like this:
LoginId EmpId Type SystemModule DateIn DateOut
32667 228 In and Out Server 27/01/2009 01:53:32 PM 27/01/2009 01:53:37 PM
32666 228 In and Out Server 27/01/2009 11:21:50 AM 27/01/2009 11:22:08 AM
32665 228 In Server 27/01/2009 11:18:43 AM
32664 228 In and Out Server 27/01/2009 11:15:33 AM 27/01/2009 11:15:37 AM
32663 228 In Server 27/01/2009 11:15:01 AM
32662 228 In and Out Server 27/01/2009 11:14:15 AM 27/01/2009 11:14:24 AM
32661 228 In Server 27/01/2009 11:11:47 AM 27/01/2009 11:12:05 AM
sorry for the crowdedness, but i think you get the idea. the question is how
can i take the old data and convert it to the way the new data is layed out?
basically i need to take a stack of 2 records and put it on one line as one
record. all the previous data is in pairs, kinda.
the problem is if someone crashed out of the database there may only be an
"In".
the reason for the change is to allow me to use one line per login and out
and to calculate the time logged in easier than trying to find the 2 records
that matched.
as always, any help or ideas are greatly welcomed!