Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting distinct rows

Status
Not open for further replies.

pbeast

Technical User
Jan 7, 2007
3
GB
Is it possible to select distinct rows from 1 table
table data looks like:

400000,george,washington
400000,george,washington
400001,thomas,jefferson


i have 5000 rows - but only want to select distinct rows by the first column - so from the data above i would only select:

400000,george,washington
400001,thomas,jefferson

Thanks.
 
Have a look at the DISTINCT predicate:
SELECT DISTINCT ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Ah thanks. But, i'm using MS access and its not letting me use that statement correctly - unless i'm doing something wrong. I'll figure out another way to get the values. Thanks.
 
I gave you SQL code advice, so go to the SQL view ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top