Skip to Content
Dec 07, 2018 at 11:27 AM

Comparing Sales Quote and Sales Order



I'm trying to write a SQL report that compares sales quotes to sales orders. I want to see all items that are on the sales quote and all items that are on the sales orders compared.

So for example the headings would be:

Sales Quote No, Item Code Quote, Quantity Quote, Item Code Order, Quantity Order

I have added a UDF to both the quote and the order that shows the same values, so we can link the two tables. I'm just unsure how to create the report so the ItemCode/Quantity Quote is shown if not on the order and the ItemCode/Quantity Order is shown if not on the Quote.

It's a way to compare what the customer was originally quoted for and what they actually ended up ordering.

I've tried using full join/left join, but this doesn't compare order for order, line by line. I've also tried left join.. I've also tried writing a sub query, but this doesn't show me the items that are on orders but that aren't shown on quotes.