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 2000 Forums
 SQL Server Development (2000)
 Checking for time overlapping in Stored Procedure

Author  Topic 

gigsvoo
Starting Member

1 Post

Posted - 2001-08-02 : 23:03:16
Hi there all nice developers,

I need to write a sql script inside a SP to check whether any records in the table that have the same date, overlapps with any records from a ASP page in the sense that the entry Begin time and End time should either before the begin time or after the end time of any records in the table but not overlapps each other.

For more illustration, my idea is

Entry Begin Time: 9:00AM
Entry End Time: 11:00AM
Any records in table begin time: 12:00AM
Any records in table end time: 1:00PM
Results: OK
--
Entry Begin Time: 9:00AM
Entry End Time: 11:00AM
Any records in table begin time: 10:00AM
Any records in table end time: 1:00PM
Results: Not OK

Please help

Thanks

David Voo
   

- Advertisement -