Fleming, are you really trying to delete duplicate rows or are you looking to identify each row distinctly? If you are need to add uniqueness to each row (identify each row distinctly), then Vijay's response will work. If not and you are truly trying to delete duplicate rows, I think there is an easier way to do this. As you found out, you can't SELECT DISTINCT on a ntext field. Is there another field you could SELECT DISTINCT on? Depending on your answer, it might be possible to do this in a single statement without the hassle of your 3 steps above.
|