TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
13
0
MS SQL Decimal Place problem. Should be so Simple.
Feb 8 2013 7:18 AM
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?
Reply
Answers (
2
)
How to convert local time to UTC time in SQL
update query in mysql