• zahid_7777 (3/9/2013)


    I have a table which contains the field COMCOD data type nchar(4), PARTYCODE data type nchar(6) Primary Key, PARTYNAME nvarchar(250)

    COMCOD PARTY CODE PARTYNAME

    3305100028Premier Cement Mills Ltd.

    3305100029Premier Cement Mills Ltd.

    3305100030Premier Cement Mills Ltd.

    3305100031Premier Cement Mills Ltd.

    3305100032Premier Cement Mills Ltd.

    3305100033Electro Power Engineering Ltd.

    3305100034Electro Power Engineering Ltd.

    3305100035Electro Power Engineering Ltd.

    3305100036Electro Power Engineering Ltd.

    3305100037Islam Trading Consortium Ltd.

    3305100038Islam Trading Consortium Ltd.

    3305100039Islam Trading Consortium Ltd.

    3305100040Mr. Ehsanur Rahman

    3305100041Mr. Ehsanur Rahman

    I have to eliminate the duplicate party name. Can anybody help me?

    There are several different outcomes to "eliminate the duplicate party name". Please post the result set that you'd expect using the data you provided above so we can figure it out.

    --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)