I have a table with a field called "Sell" which is:
Decimal 9, precision=10, scale=2
When I do: Select sum(sell) from Table, I get the answer: 2,568.78, but
when I add up the numbers on a calculator I get: 2,568.72, off by 6 cents.
Needless to say, this drives accountants nutty. Changing the data type isn't
an option since this a commercial software product we're using (the
developers know about the problem, but choose to let their reports be off by
pennies). We'd like an accurate Sum() amount, and we've tried doing
Round(@.SumSell,2) but that doesn't work.
Any ideas? THanks!I've been messing with this a little to try to duplicate your problem, but
can not..
Can you post a create table, and insert statements, and a select statement
which repros the problem?
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Dean J Garrett" <info@.amuletc.com> wrote in message
news:%23GaANOiXEHA.2844@.TK2MSFTNGP11.phx.gbl...
> I have a table with a field called "Sell" which is:
> Decimal 9, precision=10, scale=2
> When I do: Select sum(sell) from Table, I get the answer: 2,568.78, but
> when I add up the numbers on a calculator I get: 2,568.72, off by 6 cents.
> Needless to say, this drives accountants nutty. Changing the data type
isn't
> an option since this a commercial software product we're using (the
> developers know about the problem, but choose to let their reports be off
by
> pennies). We'd like an accurate Sum() amount, and we've tried doing
> Round(@.SumSell,2) but that doesn't work.
> Any ideas? THanks!
>
No comments:
Post a Comment