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-07 : 00:42:12
|
Dear All,I am looking for a query in which i can find the employee record who is absent from last 5 days continously.my tabe structure is liketable name :-logincolumnempid,logindateTHANKX & regards,Vipin jha |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
vipinjha123
Starting Member
45 Posts |
Posted - 2012-05-07 : 00:56:22
|
i am not getting the correct recordi ma looking for only those employee record who is absent fopr last 5 days continoulysupppose toady is 6th mayi should get only those employee recoed who is absent from 1st may 2012please modify your queryregards,vipin jha |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-05-07 : 01:11:16
|
Please some sample data and the expected result KH[spoiler]Time is always against us[/spoiler] |
 |
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-05-08 : 08:49:20
|
Does this work?Select empid From login_tableWhere DATEDIFF(DD, loginDate, CURRENT_TIMESTAMP) >= 5 If it does not, then please post some sample data so that we can have a look at what your requirement is.Please help us in helping you.N 28° 33' 11.93148"E 77° 14' 33.66384" |
 |
|
|
|
|