Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hours of day availability
Message
From
12/07/2011 15:44:50
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01517976
Message ID:
01518007
Views:
46
Thank you Naomi!, I'm working on the calendar table.

>Assuming you have a Calendar table that has hours intervals and days.

>select min(Interval) as NextAvailable from Calendar C
>where not exists (select 1 from Assignments A where A.[DayOfWeek] = C.[Day Of Week]
>and A.[Interval] = C.[Interval])
>were C.[DayOfWeek] = 'Tuesday';

>If it's not broken, fix it until it is.
John Harold Belalcázar Lozano
Associate Director Of Development
http://www.belvicto.co/
jhbelalc@gmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform