• Something like this should work nicely

    Select

    t.CustId

    ,t.PersonId

    ,t.startdate

    ,t.Enddate

    ,t.Name

    from

    (

    Select

    CustId

    ,PersonId

    ,startdate

    ,Enddate

    ,Name

    ,ROW_NUMBER() OVER(PARTITION BY PersonId ORDER BY Enddate DESC) as rownum

    from

    table1

    ) as t

    where

    t.rownum=1

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.