Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vipinjha123
Starting Member
45 Posts |
Posted - 2012-05-21 : 06:32:55
|
Dear All,i am looking for a query wheren i can find the exact number of employee who is currently working in officesuppose at 8am 20 person login and at same time 2 person gets log out ao i should get numbner of em,ployee at 8 am is 18i am looking for this rteport as hourly basismy table is login(empid,logintime,logouttime,location)please help me as this is very important for me,thankx regards,Vipin jha |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-21 : 16:44:34
|
what will be logouttime value for people who are currently logged in? will it be NULL or some default value?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
vipinjha123
Starting Member
45 Posts |
Posted - 2012-05-22 : 01:20:46
|
the logout time will be again the combination of datetimewhat i am looking for every hour some person login and same time some person logout so i need a output likesum of all employee who are currently in office on hourly basis.suppose at 8am 20 peson login and at the same time 5 person logout so my count wil be 15 at 8am. means at 8 am 8 people are currently in office.i am looking for result likecountofemp hour 15 823 9regards,Vipin jha |
 |
|
|
|
|