working on itSET NOCOUNT ONGOCREATE TABLE #myTable99 (AppID int, AppStart datetime, AppFinish datetime)GOINSERT INTO #myTable99(AppID, AppStart, AppFinish)SELECT 1, null, '12/30/2008 9:00:00 AM' UNION ALLSELECT 2, '12/30/2008 9:00:00 AM', '12/30/2008 9:45:00 AM' UNION ALLSELECT 3, '12/30/2008 9:45:00 AM', '12/30/2008 10:30:00 AM' UNION ALLSELECT 4, '12/30/2008 11:30:00 AM', '12/30/2008 12:00:00 PM' UNION ALLSELECT 5, '12/30/2008 1:00:00 PM', '12/30/2008 1:45:00 PM' UNION ALLSELECT 6, '12/30/2008 2:00:00 PM', '12/30/2008 3:15:00 PM' UNION ALLSELECT 7, '12/30/2008 3:15:00 PM', '12/30/2008 4:00:00 PM' UNION ALLSELECT 8, '12/30/2008 5:15:00 PM', '12/30/2008 6:00:00 PM' UNION ALLSELECT 9, '12/30/2008 7:00:00 PM', '12/30/2008 7:45:00 PM' UNION ALLSELECT 10, '12/30/2008 8:00:00 PM', nullGO
Yuo will need to reference 2 rows to each other...with a self joinIs there any employee code?Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam