SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 ABSENT REPORT
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vipinjha123
Starting Member

India
45 Posts

Posted - 05/07/2012 :  00:42:12  Show Profile  Reply with Quote
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 like

table name :-login
column

empid,logindate

THANKX & regards,
Vipin jha

khtan
In (Som, Ni, Yak)

Singapore
16769 Posts

Posted - 05/07/2012 :  00:51:27  Show Profile  Reply with Quote
what happen to the query that i posted here http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=174351

Does it work ?


KH
Time is always against us

Go to Top of Page

vipinjha123
Starting Member

India
45 Posts

Posted - 05/07/2012 :  00:56:22  Show Profile  Reply with Quote
i am not getting the correct record
i ma looking for only those employee record who is absent fopr last 5 days continouly

supppose toady is 6th may

i should get only those employee recoed who is absent from 1st may 2012

please modify your query
regards,
vipin jha
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
16769 Posts

Posted - 05/07/2012 :  01:11:16  Show Profile  Reply with Quote
Please some sample data and the expected result


KH
Time is always against us

Go to Top of Page

vinu.vijayan
Posting Yak Master

India
227 Posts

Posted - 05/08/2012 :  08:49:20  Show Profile  Reply with Quote
Does this work?


Select empid From login_table
Where 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"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000