Find Discrepancy in Unit Prices

G

Guest

Here's the scenario... I have a Manufacturer number and a unit price for that
product. The unit price should always be the same for the product. If it
isn't, then I need a query/report that will say here are all of the line
items where a product had more than one unit price. (Right now it is too
encumbersome to decide which price is right for each product) However, I need
to make a list of the products where we were charged a different price for
the same product.

I appreciate your help!! Thank you.
 
G

Guest

Try this using three queries (It could be done with one if you create
subqueries.).

Pricing_Item ---
SELECT Pricing.Item, Count(Pricing.Item) AS CountOfItem
FROM Pricing
GROUP BY Pricing.Item;

Pricing_Price ---
SELECT Pricing.Item, Pricing.Price, Count(Pricing.Price) AS CountOfPrice
FROM Pricing
GROUP BY Pricing.Item, Pricing.Price;

SELECT Pricing_Item.Item
FROM Pricing_Item INNER JOIN Pricing_Price ON Pricing_Item.Item =
Pricing_Price.Item
WHERE (((Pricing_Item.CountOfItem)<>[CountOfPrice]))
GROUP BY Pricing_Item.Item;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top