I was able to come up with a fix for the problem. When reviewing the Output I noticed that the qty that I was sorting on changed at record 19 and didn't change again until record 47. I added a hidden column with the sum of qty before that Material Number and did a sort on both of these fields...
I created another query to and did a top 20 on that and it appeared to work. I am using this data to crate a pareto chart so the order is critical. When I add the descending order to the query I get 47 records instead of the 20. I went back on tried this on the original code and the same...
Top 20 query problem
I am having problems with a top 20 query pulling more that 20 records. Here is the code
SELECT TOP 20 [Total Failure Pareto - Step 1].strMaterial_Num, Sum([Total Failure Pareto - Step 1].dblQty) AS dblQty, [Exclude Material From Pareto Chart].Exclude_Material_No
FROM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.