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 |
sunilsi
Starting Member
21 Posts |
Posted - 2008-12-11 : 23:18:57
|
Friends,Please help me to derive a sql query with the below conditions.TableName -> EducationDepartmentColumns -> empID, checkInTime (datetime).I need to get all the employee ID's who's working hour is greater than 2 hours i.e GetDate() - checkInTime > 2.Please help me on this.Thx,Linus |
|
soorajtnpki
Posting Yak Master
231 Posts |
Posted - 2008-12-12 : 00:10:06
|
try like this, select empid from EducationDepartment where datediff(hh,checkInTime,getdate()) > 2 ok tanx.... |
 |
|
sunilsi
Starting Member
21 Posts |
Posted - 2008-12-12 : 00:40:07
|
Thanks friend! |
 |
|
soorajtnpki
Posting Yak Master
231 Posts |
Posted - 2008-12-12 : 01:05:08
|
ok,welcome |
 |
|
|
|
|