• kat35601 (7/23/2015)


    what I get with the original query is a total box count for the UOMPSCHEDULENUMBER for 072115-01 I would get 812 for every line but with these I get the sum of the order line on every line which inflates my box count to 3892.

    This leaves the question of which SUM you want, unanswered. Clearly, the supplied query isn't the one you want, but the question remains as to what SUM is desired when the user specifies multiple values. Also, as we have no sample data to work with, it's rather difficult to know how to write the code to meet your specific needs. We don't have DDL to describe each table involved, nor do we have any indication as to what a record in each such table represents, so we're seriously flying blind here. Please do what you can to fill the gaps....

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)