J
Joe
I use Allen Browne's sample clash query
(http://members.iinet.net.au/~allenbrowne/appevent.html)
to check new absence records before they are updated. The
absence records are deemed to overlap if any date
overlaps. Record 1 does not show a record a clash. But
record 2 doe's record a clash.
Record 1
eventname start end
locationid eventid Recorded By
absent 13/09/2004 15/09/2004 Peter
Barwell 8 Joe
absent 15/09/2004 19/09/2004 Peter
Barwell 36 Joe
Record 2
eventname start end
locationid eventid Recorded By
absent 13/09/2004 15/09/2004 Peter
Barwell 8 Joe
absent 14/09/2004 19/09/2004 Peter
Barwell 36 Joe
This is not quite what I want as both records are
considered overlaps. Is it possible to refine the query to
show both records as clashes.
Allen Browne's query
SELECT tEvent.eventid, tEvent.start, tEvent.end,
tEvent.locationid, tEvent_1.eventid, tEvent_1.start,
tEvent_1.end, tEvent_1.locationid
FROM tEvent, tEvent AS tEvent_1
WHERE (((Nz(([tEvent_1].[Start]>=[tEvent].[End]) Or
([tEvent_1].[End]<=[tEvent].[Start]) Or ([tEvent].
[LocationID]<>[tEvent_1].[LocationID]) Or ([tEvent].
[EventID]=[tEvent_1].[EventID]),False))=False))
ORDER BY tEvent.eventid, tEvent_1.eventid;
(http://members.iinet.net.au/~allenbrowne/appevent.html)
to check new absence records before they are updated. The
absence records are deemed to overlap if any date
overlaps. Record 1 does not show a record a clash. But
record 2 doe's record a clash.
Record 1
eventname start end
locationid eventid Recorded By
absent 13/09/2004 15/09/2004 Peter
Barwell 8 Joe
absent 15/09/2004 19/09/2004 Peter
Barwell 36 Joe
Record 2
eventname start end
locationid eventid Recorded By
absent 13/09/2004 15/09/2004 Peter
Barwell 8 Joe
absent 14/09/2004 19/09/2004 Peter
Barwell 36 Joe
This is not quite what I want as both records are
considered overlaps. Is it possible to refine the query to
show both records as clashes.
Allen Browne's query
SELECT tEvent.eventid, tEvent.start, tEvent.end,
tEvent.locationid, tEvent_1.eventid, tEvent_1.start,
tEvent_1.end, tEvent_1.locationid
FROM tEvent, tEvent AS tEvent_1
WHERE (((Nz(([tEvent_1].[Start]>=[tEvent].[End]) Or
([tEvent_1].[End]<=[tEvent].[Start]) Or ([tEvent].
[LocationID]<>[tEvent_1].[LocationID]) Or ([tEvent].
[EventID]=[tEvent_1].[EventID]),False))=False))
ORDER BY tEvent.eventid, tEvent_1.eventid;