• Well, then your friend must have had a lot more information available than we did...

    How else could he come up with Row_Number when there was nothing in your post indicating that you have duplicates and only need to get the first match?

    Please don't compare apples and oranges...

    Btw: this is a very nice example of how much an answer would vary based on the information provided...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]