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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 date and time query

Author  Topic 

job3gs1
Starting Member

1 Post

Posted - 2007-09-01 : 03:12:05
Hi,

I want to know how can i query from sql server data base if the given time is within the range of existing date and time
with existing data on the leaves table with thesame date and employee:

ApproveDate: 8/22/2007
TimeIn : 8:00:00 AM
TimeOut : 12:00:00 PM

I just want that users can't apply leaves to conflict time:
valid time :
down - 8:00:00 AM
12:00:00 PM - up

invalid time are with in from 8:00:00 AM to 12:00:00 PM

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-01 : 18:42:38
Can you post table schema, some sample data and results you like to see?
Go to Top of Page
   

- Advertisement -