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
 Transact-SQL (2000)
 Fairly Difficult UPDATE query

Author  Topic 

simondeutsch
Aged Yak Warrior

547 Posts

Posted - 2002-03-14 : 14:25:56
Hi!
I have a (temp) table with a schedule for a day divided into 15 minute increments, each row representing a 15 minute segment. The table has an Unavailable column, specifying whether or not a resource is available at that time slot or not. I also have an Availability table which has up to 5 schedule rows for any particular day for any particular resource e.g.
(all times are represented as integers, # of minutes since 12:00 AM)
Day Start End
Monday 450 750
Monday 1020 1050
Monday 1065 1170
Tuesday ... ...
I want to update the temp table's Unavailable column, that if a 15 minute segment(row) is not between (actually, >= Start AND < End) a valid time range for that day, Unavailable should be 1, otherwise 0.

Thanks!!



Sarah Berger MCSD

Jay99

468 Posts

Posted - 2002-03-14 : 14:29:53
double post
Go to Top of Page
   

- Advertisement -