More decimal places then expected after Sum-function

Posted on 2003-03-18
Medium Priority
Last Modified: 2008-02-26
importing a txt-file in a MS-Access table.
content of txt-file looks like this:
Workplace_ID Total_Amount(currency)
aaa    23.23
bbb     2
ccc     123.7
aaa    45
bbb     4.6
aaa      0

So, in the source txt-file not more than 2 decimal places.

In a query I Group By Workplace_ID and Sum the Total_Amount collum.
The result looks like this:
Workplace_ID   Total_amount
Group by        Sum
aaa                68.23
bbb                6.6099999997
ccc                123.7000000001

Here's my problem:
after Grouping by I get in the sum collum numbers with more than 2 (!) decimal places. In fact much more than 2, but not with all results! Where do they come from, because in the txt-file there are not more than 2?

Question by:Walter4
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

mr_chinchin25 earned 160 total points
ID: 8158339
dunno if this will help, but try changing the format to fixed, and setting decimal places to 2.

Expert Comment

ID: 8158385
when importing txt or csv files, make sure that your delimiter is not the same as your decimal indicator (. or ,) some strange results can happen if they are the same. You can check in the windows regional settings what your decimal indicator is.

Author Comment

ID: 8159070
Dear mr. chinchin25,

I know how to solve the problem, but I was curious what the back ground was of these sum results.
I'll try LBoolean's comment in search of the rules behind this Access fact.

Thanx anyway!

Author Comment

ID: 8159478
Dear LBoolean,
I'm importing with fixed spacings, so delimiters are no issue here, I think.

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question