SQL Server 2000
Table1
ID Date Workedtime
001 23-02-2009 08:00:00
001 24-02-2009 15:00:00
001 25-02-2009 17:00:00
002 ...
So on..,
Table2
ID FromDate ToDate
001 24-02-2009 25-02-2009
002 27-02-2009 03-03-2009
...
I want to compare the table1 date and ID with Table2 ID FromDate, ToDate, means Table1 Date compare with FromDate ToDate, if Date is comes in between fromdate and todate, the worktime should display absent.
Expected Output
ID Date Workedtime
001 23-02-2009 08:00:00
001 24-02-2009 absent
001 25-02-2009 absent
002 ...
Need Query Help