Hi,

I am trying to select certain rows from a table based on criteria relating to other rows in the same table. I want each row in the table to be compared with each other row and if the term dates of the selected row are within those of any of the other rows then I wish for that selected row to be put into the result set in for the query.

(Hope that makes sence!)

However, what it is doing is it is comparing the selected row to itself and It is automatically putting each row into the result set as each row fullfills the criteria when being tested against itself.....

What I want to happen is that once the query selects a row from the table BTI, it then checks it against each other row in the table (Which is duplicated and called TEST) without comparing that row to itself.

The code I am trying to use at the moment is as follows....:

SELECT DISTINCT BTI.*
FROM BTI, BTI as [TEST]
WHERE BTI.[Term End] Between [TEST].[Term Beg] And [TEST].[Term End];

Hope someone can help! Thanks!!