Problem importing decimal places

R

RobertM

I'm trying to get data into a table. The values are #'s such as 108.577645.
When I paste it over it comes out 108.577650. I've also tried to import this
data from a text file as well as from excel without any luck. I've got the
table set up to
hold six decimal places, but it still rounds off. I'm dealing with a
database that is dependent on imported data from another system. Any
suggestions.
 
T

Tim Ferguson

I've got the table set up to
hold six decimal places, but it still rounds off.

What "size" is the numeric field set to? A Double should handle this
precision easily enough, but a Single may be rounding at about this level.

B Wishes


Tim F
 
P

peregenem

Tim said:
What "size" is the numeric field set to? A Double should handle this
precision easily enough, but a Single may be rounding at about this level.

They could actually mean DECIMAL with a scale of 6 e.g.

ALTER TABLE MyTable ADD price_euros DECIMAL(15, 6) NOT NULL
 
J

Jeff Boyce

This may not apply in the circumstances...

I seem to recall seeing that there are issues with sorting (and other
topics) in the use of the DECIMAL data type.
 
P

peregenem

Jeff said:
This may not apply in the circumstances...

I seem to recall seeing that there are issues with sorting (and other
topics) in the use of the DECIMAL data type.

BUG: You may notice an incorrect sorted order when you sort the
negative decimal values in descending order in Access
http://support.microsoft.com/default.aspx?scid=kb;en-us;837148

It's not 'critcal' because sorting can be successfully performed
elsewhere, notably using a recordset's Sort property. Just as well
because

SELECT TYPENAME(108.577645)

returns 'Decimal' i.e. this data type is used natively by the data
engine!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top