D
Dee
Ok here's the issue. In order to find MFG #s with different prices (since we
should always be charged the same price for said product), I had to make two
queries. The first one to group the products and the second to find
duplicate product numbers with different prices. However, in the end, I need
other fields from the table to show the rest of the data for the duplicate
products. But I don't know how find the duplicate information without
grouping and if I put every field on the original totals query, then it will
defeat the purpose of grouping... How can I do this?
Here are the two queries
Discrepancies in Unit Price:
SELECT Data.MANUFACTURER, Data.[MFG #], Data.DESCRIPTION, Data.[UNIT PRICE]
FROM Data
WHERE (((Data.Month)=#10/1/2006#))
GROUP BY Data.MANUFACTURER, Data.[MFG #], Data.DESCRIPTION, Data.[UNIT PRICE]
ORDER BY Data.MANUFACTURER, Data.[MFG #];
Find duplicates for Discrepancies in Unit Price
SELECT [Discrepancies in Unit Price].[MFG #], [Discrepancies in Unit
Price].MANUFACTURER, [Discrepancies in Unit Price].DESCRIPTION,
[Discrepancies in Unit Price].[UNIT PRICE]
FROM [Discrepancies in Unit Price]
WHERE ((([Discrepancies in Unit Price].MANUFACTURER) In (SELECT
[MANUFACTURER] FROM [Discrepancies in Unit Price] As Tmp GROUP BY
[MANUFACTURER],[MFG #] HAVING Count(*)>1 And [MFG #] = [Discrepancies in
Unit Price].[MFG #])))
ORDER BY [Discrepancies in Unit Price].[MFG #], [Discrepancies in Unit
Price].MANUFACTURER;
Here are all of the fields in the original table (which if I could include
this information as well, I would like to):
ID, INVOICE NUMBER, TYPE, INVOICE DATE, BILL-TO, COST CENTER, PRACTICE NAME,
ADDRESS, CITY, STATE, ZIP, MFG #, MANUFACTURER, ITEM #, DESCRIPTION, UNIT,
QTY SHIP, UNIT PRICE, AMOUNT, MONTH
should always be charged the same price for said product), I had to make two
queries. The first one to group the products and the second to find
duplicate product numbers with different prices. However, in the end, I need
other fields from the table to show the rest of the data for the duplicate
products. But I don't know how find the duplicate information without
grouping and if I put every field on the original totals query, then it will
defeat the purpose of grouping... How can I do this?
Here are the two queries
Discrepancies in Unit Price:
SELECT Data.MANUFACTURER, Data.[MFG #], Data.DESCRIPTION, Data.[UNIT PRICE]
FROM Data
WHERE (((Data.Month)=#10/1/2006#))
GROUP BY Data.MANUFACTURER, Data.[MFG #], Data.DESCRIPTION, Data.[UNIT PRICE]
ORDER BY Data.MANUFACTURER, Data.[MFG #];
Find duplicates for Discrepancies in Unit Price
SELECT [Discrepancies in Unit Price].[MFG #], [Discrepancies in Unit
Price].MANUFACTURER, [Discrepancies in Unit Price].DESCRIPTION,
[Discrepancies in Unit Price].[UNIT PRICE]
FROM [Discrepancies in Unit Price]
WHERE ((([Discrepancies in Unit Price].MANUFACTURER) In (SELECT
[MANUFACTURER] FROM [Discrepancies in Unit Price] As Tmp GROUP BY
[MANUFACTURER],[MFG #] HAVING Count(*)>1 And [MFG #] = [Discrepancies in
Unit Price].[MFG #])))
ORDER BY [Discrepancies in Unit Price].[MFG #], [Discrepancies in Unit
Price].MANUFACTURER;
Here are all of the fields in the original table (which if I could include
this information as well, I would like to):
ID, INVOICE NUMBER, TYPE, INVOICE DATE, BILL-TO, COST CENTER, PRACTICE NAME,
ADDRESS, CITY, STATE, ZIP, MFG #, MANUFACTURER, ITEM #, DESCRIPTION, UNIT,
QTY SHIP, UNIT PRICE, AMOUNT, MONTH