Hi,
FROM is a reserved word.
SELECT a.holeID, a.start, a.end, b.holeID, b.start, b.end
FROM myTable As a INNER JOIN myTable As b
INNER JOIN a.start <= b.end AND a.end >=b.start AND a.holeID < b.holeID
There is NO overlap if a.start > b.end OR if a.end < b.start
(since a starts after the ending of the other or ends before the start of
the other).
To have overlap, negate the sentence, using De Morgan law, to get
a.start <= b.end AND a.end >= b.start
the additional condition, a.holeID < b.holeID, is to break symmetry: If
A overlaps B, then B overlaps A. We only want one mention, not two, so we
decide to only keep the mention where A overlaps B, not the mention that B
overlaps A (in case there is overlapping).
Hoping it may help,
Vanderghast, Access MVP
>I have a question about queries in an Access Database, I'm using MS office
> 2000.
[quoted text clipped - 26 lines]
>
> Thanks for any feedback.