how to select TOP rows from an output

  • [font="Comic Sans MS"]Hi all.

    I have question in a query that is returning me a set of data....with following columns:

    account_no / emply_no / dept_no / address / Balance / phone / route / city / ....and 10 more columns...

    now i am getting with some repeated account numbers in my result...

    I want to select only the first row for every account reegardless of values in other columns,,,

    the values in other columns may or may not be same ...

    for example dept no can be D1 for the same account and can also be D2 for the same account..I just want the first row that is returned from the main query...

    any help

    thanks a lot

    [/font]

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • Do not cross post ! Please reply at the post under the thread given below, since that is more appropriate board (this one being SSIS)

    http://www.sqlservercentral.com/Forums/Topic844981-338-1.aspx


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

Viewing 2 posts - 1 through 2 (of 2 total)

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