• Aiee! Yes, I tapped it in a bit of a hurry. Any delimiter between the values will help the hash. My only worry is that it found one more row to delete than the original problem-setter said there would be, but it seems to be a genuine candidate for deletion.

    Also it sometimes needs an extra '' in the expresssion to get it to work in SQL Server 2000, due to a bug in SQL Server!

    If you turn the logic round, it selects all the unique rows without a group-by. I wonder if it is quicker than the DISTINCT or GROUP BY?

    Best wishes,
    Phil Factor