How to get only one row for each distinct value in the column ?

Posted by Chavdar on Stack Overflow See other posts from Stack Overflow or by Chavdar
Published on 2010-03-17T21:33:18Z Indexed on 2010/03/18 15:51 UTC
Read the original article Hit count: 565

Filed under:

Hi Everybody,

I have a question about Access.If for example I have a table with the following data :

NAME | ADDRESS
John Taylor | 33 Dundas Ave.
John Taylor | 55 Shane Ave.
John Taylor | 786 Edward St.
Ted Charles | 785 Bloor St.
Ted Charles | 90 New York Ave.

I want to get one record for each person no matter of the address.For example :

NAME | ADDRESS
John Taylor | 33 Dundas Ave.
Ted Charles | 90 New York Ave.

Can this be done with queries only ? I tried using DISTINCT, but when I am selecting both columns, the combination is allways unique so I get all the rows.

Thank you !

© Stack Overflow or respective owner

Related posts about ms-access