Select Distinct Field

mugman17

Registered User.
Local time
Today, 18:10
Joined
Nov 17, 2000
Messages
110
Help

Here is my query:

SELECT [Inventory Transactions].DealID, [Inventory Transactions].BuyerId, Suppliers.SupplierName, [Inventory Transactions].Supplier
FROM Suppliers INNER JOIN [Inventory Transactions] ON Suppliers.SupplierID = [Inventory Transactions].BuyerId
WHERE ((([Inventory Transactions].Market)="5"));

Right now it runs through all the records and gives me the SupplierName for each related record.

I am using this to populate a drop down list, so I only need to see the Supplier Name once even if they have done several deals.

Thanks.
Jeff
 
Then do not include the extraneous fields in the select clause.

SELECT Distinct Suppliers.Supplier, Suppliers.SupplierName
FROM Suppliers INNER JOIN [Inventory Transactions] ON Suppliers.SupplierID = [Inventory Transactions].BuyerId
WHERE [Inventory Transactions].Market = "5";
 

Users who are viewing this thread

Back
Top Bottom