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

Unique Value Returns

Status
Not open for further replies.

DrunkenEngineer

IS-IT--Management
Aug 13, 2001
6
CA
I need to build a menu showing all the unique entries in a certain table field. The table lists part vendors, and I need to create a simple listing of all the vendors we deal with, but the table can have 100-200 parts all manufactured by the same vendor, therefore appearing in the table 100-200 times.

Is there a way to look through the table, and pick out all the unique vendor names? (ie. If a vendor is shown many times, only display it once in the list?)
 
SELECT DISTINCT vendorname FROM tablename

The DISTINCT keyword can be used to eliminate duplicates.

Hope this helps... J. Jones
jjones@cybrtyme.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top