XPost: microsoft.public.sqlserver.programming, microsoft.public.   
   qlserver.server   
   From: d4Nf6c4c5@benoni.com   
      
   "Modern Benoni" wrote in message   
   news:hd1mqm$8lf$1@aioe.org...   
   >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.   
   >   
      
   I'm using SQL Server 2000 and no, this is not a homework assignment but a   
   real life problem that is very similar to this one.   
   Thanks   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|