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.

 All Forums
 Other Forums
 MS Access
 Time Difference

Author  Topic 

hussainzim
Starting Member

21 Posts

Posted - 2007-11-14 : 22:37:23
i want to find employee numbers who have spent more than 30 mins lunch break

table structure

Lunch(EmployeeId,LunchIn,LunchOut)

Thank You In Advance

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-14 : 22:41:52
Select EmployeeID
FROM LUNCH
where datediff(n,LunchIn,LunchOut) >30

relies on the Lunchin and lunchout fields being datetime.

Try the F1 key, help menu or books on line. You could have had the answer in less time than it took to post.




Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

hussainzim
Starting Member

21 Posts

Posted - 2007-11-14 : 22:56:05
hey wht is 'n' here??

Error message "No value given for one more parameters"
Go to Top of Page

hussainzim
Starting Member

21 Posts

Posted - 2007-11-14 : 23:01:52
hey thanks..its working.......
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-14 : 23:07:58
You're welcome.

http://msdn2.microsoft.com/en-us/library/ms189794.aspx

there is your answer. Google is your friend.



Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page
   

- Advertisement -