your code is a thing of beauty :) i modified it to run against the table i was using and was getting the same results i was getting before, whihc confused me because looking at it, it definatley said exaclty what i needed. so i opened a new view and plugged it in and started playing with it. the first thing i did was change it to show the results from a and b, and bingo, there it was. with this, i dont need the top 2 rows, just the top 1 with the nd date set to order by desc, and tada, i had the exact results i was looking for. so here is what i used: SELECT TOP (1) a.nvarchar, b.nvarchar AS nvarchar2, b.int, a.int AS int2, a.StartDate, b.StartDate AS StartDate2, a.EndDate, b.EndDate AS EndDate2 FROM [table] AS a INNER JOIN [table] AS b ON a.int = b.int AND a.nvarchar <> b.nvarchar AND b.EndDate < getdate() AND a.EndDate < GETDATE() ORDER BY int2 DESC Thank you very much for this, you saved me a massive headache. And thank you to everyone that replied, i appreciate any input :D
______________________ Mr Griffin, eleventy billion is not a number...:wtf: