• In order to make the results consistent, we'd need something reliable to tell us which of the two records is "first". Is there something like an identifier column that would tell which record was "first"? Or - a data added? or - does the quarter number win over the salesrep name?

    Without a predictable order (inside of the PARTITITION), the following syntax will return ONE row per client, but it might not be the same one each time you run it...

    WITH FirstClient (Last,first,rep,qtr,rn) as

    (

    select

    LastName as Last,

    FirstName as First,

    SalesRep as Rep,

    Quarter as Qtr,

    ROW_NUMBER OVER (PARTITION by LastName,FirstName ORDER by

    LastName,FirstName,Quarter,SalesRep) as rn

    from MyClientTable

    )

    select

    last,

    first,

    rep,

    qtr

    from FirstClient

    where rn=1

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?