|  | Posted by Erland Sommarskog on 07/13/05 12:05 
(angelasg@comcast.net) writes:> There are shifts that end past midnight.  But the shiftdate always
 > represents the date the shift started.  In the original sample data, ID
 > 99 represents an employee.  ShiftDate 5/2/2005 represents the entire
 > work day.  The segtimes are start/end times of different segments of
 > the day such as taking cust calls, training, break, lunch, etc.  So Emp
 > 99 worked from 1p-5p on 5/2.  She could have very well ended her shift
 > past midnight, but the shift date would have been the same.
 
 OK. In that case the query would work. I was thinking that having two
 columns were redudant, since the date appears in both, but with your
 explanation, I see why the separate date column is needed.
 
 
 --
 Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
 
 Books Online for SQL Server SP3 at
 http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
  Navigation: [Reply to this message] |