Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 17,683 of 19,505    |
|    Modern Benoni to All    |
|    How to determine free time    |
|    06 Nov 09 22:36:26    |
   
   XPost: microsoft.public.sqlserver.programming, microsoft.public.   
   qlserver.server   
   From: d4Nf6c4c5@benoni.com   
      
   I have a table having classes start time and duration. So for example   
      
   Create Table MyClasses ( ClassName nvarchar(15), StartTime nvarchar(5),   
   Duration int );   
      
   Insert into MyClasses values ('Physics', '09:00', 40 );   
      
   Insert into MyClasses values ('Math', '11:30', 50 );   
      
   Insert into MyClasses values ('Chemistry', '13:30', 60 );   
      
   Insert into MyClasses values ('Biology', '16:00', 40 );   
      
      
      
   Now I want to write a query that gives my the free time between the classes.   
   Like   
      
    from to duration   
      
   Free Time Slot 1 9:40 11:30 1:50   
      
   Free Time Slot 1 12:20 13:30 1:10   
      
   Free Time Slot 1 14:30 16:00 1:30   
      
      
      
      
      
   Thanks in advance.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca