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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make only one field distinct?

Status
Not open for further replies.

steve728

Programmer
Joined
Mar 16, 2003
Messages
536
Location
US
I basically want a distinct OrderID field but not exclude the other fields from showing up in the query results. For example I would guess the syntax is something like:

"SELECT DISTINCT OrderID AS OnlyOne, CustName, Address1, Address2, etc."

That doesn't look right. Maybe a subquery???

Thanks in advance,

Steve728
 
If there are more than one CustName values per OrderID, which CustName do you want? Can you provide a few sample records and how you would like the result to display?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top