Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open slots in SQL Server
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Open slots in SQL Server
Miscellaneous
Thread ID:
00759404
Message ID:
00759404
Views:
52
Hi everybody,

This seems like an interesting problem:
===========================================
ID.......StartDate............FinishDate
1 .......1/1/2003 07:30.......1/1/2003 08:00
2 .......1/1/2003 08:00.......1/1/2003 09:45
3........1/1/2003 15:00.......1/1/2003 15:30

given an initial start date and finish, lets say all dates can range from 07:00 to 18:00 in one day.

How could i produce results like:

1/1/2003 07:00 - 07:30 - FREE
1/1/2003 07:30 - 08:00 - RESERVED
1/1/2003 08:00 - 09:45 - RESERVED
1/1/2003 09:45 - 15:00 - FREE
1/1/2003 15:00 - 15:30 - RESERVED
1/1/2003 15:30 - 18:00 - FREE
=======================================
Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform