Hi,
Running Access 2013 on Windows 8.1
Need help finishing this query. I know I'm close. I'm getting just one record, but missing all the records from the first table.
I have a table of Product Prices (Pricing) and a second table of Deviated Prices (DeviatedPrice) for special customers.
I need to generate a List of Prices for a specific client, but if the PartNo exist in both tables and the client is the one in question (ClientID), have the deviated price written to the table rather than the standard price.
Any help would be greater appreciated. See code below.
SELECT Pricing.PartNo, Pricing.StandardPrice, DeviatedPrice.DeviatedPrice
FROM Pricing LEFT JOIN DeviatedPrice ON Pricing.PartNo = DeviatedPrice.PartNo
WHERE DeviatedPrice.ClientID=7382;
If I mess around with the joins, I either get just one record or all the record plus one extra. The deviated price for the client in question is added to the table along with the standard price. I need the deviated price to override the standard price for that client.
Thank you,
Ira