Select first record from duplicate records

  • Hi,

    I need to select only one set of record from a set of duplicate records .

    Help Appreciated .

    Thanks,

  • Maybe this link will answer your question.

    If not, please follow the link in my signature on how to post sample data.



    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]

  • :hehe: I wish I had these canned answers too... I used to refer users on a different forum to this link...

    _______________________________________________________________________
    For better assistance in answering your questions, click here[/url]

  • Panchi (9/16/2009)


    Hi,

    I need to select only one set of record from a set of duplicate records . Below is my query .

    SELECT DISTINCT ...

    Since you're using DISTINCT, what are you calling a dupe? You need to post some more information before anyone can help you because we just don't have access to your data nore what the business rules for that data are.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply