Hi All, I have come across an odd problem.
SELECT Customer, QtyRejected, Year, Month, QtyShipped, CAST(SUM(QtyRejected) / SUM(QtyShipped) * 1000000 AS Numeric(9, 2)) AS PPM
FROM dbo.MasterRejects_and_CCARShipped_Join
GROUP BY Customer, QtyRejected, Month, Year, QtyShipped
The calculation is 45 / 322524 * 1000000. The answer should be 139.52. The SQL server returns 139.00
I cannot see what I am doing wrong. Could someone please help?
MS SQL Decimal Place problem. Should be so Simple.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Feb 8, 2013, 3:20 AM EST
Guest User13 reputationPosted Feb 8, 2013, 6:06 AM EST
Thank you once again Santhosh!!