J
John
I have a query that needs to only show one of each supplier name. Currently
the sql statement (below) shows each supplier multiple times one for each
purchase order. Only want to show the supplier one time.
SELECT First(Suppliers.Name) AS FirstOfName, Suppliers.Address1,
Suppliers.Address2, Suppliers.City, Suppliers.State, Suppliers.Zip,
Suppliers.IsAClient, Suppliers.Status, Suppliers.Phone1,
Suppliers.ApprovalStatus, PurchaseOrders.Date
FROM Suppliers INNER JOIN PurchaseOrders ON Suppliers.ID =
PurchaseOrders.SupplierID
GROUP BY Suppliers.Address1, Suppliers.Address2, Suppliers.City,
Suppliers.State, Suppliers.Zip, Suppliers.IsAClient, Suppliers.Status,
Suppliers.Phone1, Suppliers.ApprovalStatus, PurchaseOrders.Date
HAVING (((Suppliers.IsAClient)=No) AND ((PurchaseOrders.Date) Between
#1/1/2008# And #1/31/2009#))
ORDER BY First(Suppliers.Name);
Any assistance is appreaciated.
.... John
the sql statement (below) shows each supplier multiple times one for each
purchase order. Only want to show the supplier one time.
SELECT First(Suppliers.Name) AS FirstOfName, Suppliers.Address1,
Suppliers.Address2, Suppliers.City, Suppliers.State, Suppliers.Zip,
Suppliers.IsAClient, Suppliers.Status, Suppliers.Phone1,
Suppliers.ApprovalStatus, PurchaseOrders.Date
FROM Suppliers INNER JOIN PurchaseOrders ON Suppliers.ID =
PurchaseOrders.SupplierID
GROUP BY Suppliers.Address1, Suppliers.Address2, Suppliers.City,
Suppliers.State, Suppliers.Zip, Suppliers.IsAClient, Suppliers.Status,
Suppliers.Phone1, Suppliers.ApprovalStatus, PurchaseOrders.Date
HAVING (((Suppliers.IsAClient)=No) AND ((PurchaseOrders.Date) Between
#1/1/2008# And #1/31/2009#))
ORDER BY First(Suppliers.Name);
Any assistance is appreaciated.
.... John