July 31, 2009 at 8:58 am
Your function uses Row_Number. In my last post I mention that I'm using SS2K so Row_number wasn't an option. I could see how to do it in SS2005, but am struggling in SS2K.
Any ideas?
Jay
__
July 31, 2009 at 9:22 am
Jason,
Sorry, busy day, I missed that. For 2K, my first thought is to use either a table variable or temp table with an identity. Definitely not the most efficient nor scalable solution, but it would work. Short of that, I’m not sure.
July 31, 2009 at 9:26 am
Jason,
Had a thought: Union?
SELECT A.Name, A.ID, B.Name
FROM #temp1 A
JOIN #temp1 B
ON A.ID = B.ID
AND A.Name > B.Name
UNION
SELECT Name, ID, Name
FROM #temp1
GROUP BY Name, ID
HAVING COUNT(*) > 1
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply