Hi,
Table: tblOnCall
Fields: PKey
DeptId
StartDate
EndDate
On insert or update of a new record, I need to count how many records have any part of the new record date range overlapping any part of a date range in the table, for the matching DeptId. There may be many records with the same DeptId.
i.e something like SELECT COUNT(*) FROM ONCALL WHERE (overlap stuff calculated)
How to??
All help appreciated.
TIA.
keijen
Table: tblOnCall
Fields: PKey
DeptId
StartDate
EndDate
On insert or update of a new record, I need to count how many records have any part of the new record date range overlapping any part of a date range in the table, for the matching DeptId. There may be many records with the same DeptId.
i.e something like SELECT COUNT(*) FROM ONCALL WHERE (overlap stuff calculated)
How to??
All help appreciated.
TIA.
keijen