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?
Loading
Santhosh Kumar JayaramanPosted Feb 8, 2013, 8:20 AM
Guest UserPosted Feb 8, 2013, 11:06 AM
Thank you once again Santhosh!!