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

Returning One of Each in a query

Status
Not open for further replies.

psbsmms

Programmer
Dec 14, 2001
74
i have a form that i want to use as a search of a table in the DB. One of the fields in the table is color, and i was hoping to set the data in the combo box to the field, but i only want one unique record. If there are several reds, I only want one to show up.
 
Use 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 FAQ222-2244
 
Works like a charm, thanks i thought it might be something like that, but I loaned out my SQL book and it has not been returned. My grandfather had a sign in his shop that read "I have what you want to borrow because i never loaned it out." Maybe I need to follow his advice. Once again thanks for the quick response.
 
I loaned out my SQL book and it has not been returned
Search your local drives for files named jet*.chm

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top