• here's my best guess for you: in this case,note how i provided a CREATE TABLE and sample data via INSERT INTO?

    if you can do the same in future posts, you'll be able to get tested, working answers from our volunteers.

    here i'm using row_number to partition by the name, and since we don't care which record we get, the order by doesn't have much of an impact.

    the second query, where i limit it just to the first matching row is what i think you are after:

    CREATE TABLE #MySampleData([Name] varchar(30),[Address]varchar(30))

    INSERT INTO #MySampleData

    SELECT 'Tai ',' 123 Main St' UNION ALL

    SELECT 'Tai ',' 897 Main St' UNION ALL

    SELECT 'Tai ',' 123 Main St' UNION ALL

    SELECT 'Mike ',' 456 Broadway' UNION ALL

    SELECT 'Mike ',' 456 Broadway'

    SELECT row_number() over(partition by name order by name) AS RW,* FROM #MySampleData

    select * FROM

    (

    SELECT row_number() over(partition by name order by name) AS RW,* FROM #MySampleData

    )

    WHERE RW = 1

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!