Given the SQL below I am seeing the Company name more than once
SQL
SELECT Distinct Customers.CompanyName, Orders.OrderDate,
YEAR(Orders.OrderDate) AS Order_Year, Day(Orders.OrderDate) AS Order_Day,
Month(Orders.OrderDate) AS Order_Month, Customers.City, Customers.Region,
Customers.PostalCode, Customers.Country, [Order Details].UnitPrice, [Order
Details].Quantity, [Order Details].Discount, [Order
Details].UnitPrice*[Order
Details].Quantity*(1-[Order Details].Discount) AS Extended_Amount
FROM (Customers INNER JOIN Orders ON Customers.CustomerID =
Orders.CustomerID) INNER JOIN [Order Details] ON Orders.OrderID = [Order
Details].OrderID;
Data
Company Name Order Date Order_Year Order_Day Order_Month City Region
Postal
Code Country
Alfreds Futterkiste 25-Aug-1997 1997 25 8 Berlin 12209 Germany
Alfreds Futterkiste 25-Aug-1997 1997 25 8 Berlin 12209 Germany
Alfreds Futterkiste 25-Aug-1997 1997 25 8 Berlin 12209 Germany
Alfreds Futterkiste 03-Oct-1997 1997 3 10 Berlin 12209 Germany
Alfreds Futterkiste 13-Oct-1997 1997 13 10 Berlin 12209 Germany
Jon said:
The query below is expected to return 'distinct' fields from a text
field.
Does distinct work within MS Access 2003 databases? Any ideas?
SQL
SELECT DISTINCT [Sales by Customer (Cube)].CompanyName,[Sales by Customer
(Cube)].Order_Year,[Sales by Customer (Cube)].Extended_Amount FROM [Sales
by
Customer (Cube)]