Decimal Hell

G

Guest

This is very frustrating.

I have two ID field, both doubles. ID1 is in an Access table, ID2 is in a
linked table in Oracle. When I export my query as fixed text file, I am
getting two decimals added to ID1, but not ID2. I've tried converting ID1
to a string using cstr(ID1) without success. I've tried using
Format(ID1,"0"), same thing. ID1 is the first field in the export. If I
make it the 2nd or the 3rd, I lose the decimals.

I'm stumped. Any help would be appreciated.

Paul
 
J

Jeff Boyce

Paul

Your ID field is a "double" numeric value? Typically, numeric values are
used when you need to "do math" on the field/column. Are you
adding/subtracting/.... your IDs?

If not, what purpose does the decimal point (and decimal places) serve?

When folks ask about "numbers" that are zip codes, my advice is to use Text
datatype instead (see above reasoning).

When folks ask about "numbers" that are counts of something, a numeric
datatype makes sense.

When the thing being measured is being measured to a precision that requires
decimal places, I generally recommend "currency" data type (this handles up
to 4 decimal places accurately).

When the measurements require more than four decimal places, "single" or
"double" make sense.

So, what is it that your IDs are "measuring?"<g>

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

I agree, these should be text fields and I converted ID1 in my Access table
to text. The problem still occurs. My ID1 field in the exported text file
continues to have .00 added to each field, even though it is a text field.

Paul
 
G

Guest

I finally dug my way out of this and I can only guess why it works. I
created a new export query identical to the original then exported by
creating a new export spec and the decimals went away. When I used the old
export spec the decimals returned, so I guess the problem was connected to
the export spec somehow.

I did some research recently on Name Auto Correct problems and I wonder if
this is related to that.

Paul
--
 

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