Convert Percentages in Table

J

JK

I have a table that I imported from another database. The table has a couple
of thousend records in it and I'd like to keep the data intact. However, I'm
having trouble with a couple of the % columns. For example, the data is
appearing like this 70% when it should be appearing like this 0.7%. The
actual value in the field is 0.699999988 (that's the value shown when I click
on the field with the 70% value.) I need to know how to convert the table
field so that it shows 0.7%.

You should also know that I have the field size set to Double, I have the
field format set to Percent and I've tried playing around with the decimal
places but that only adds zeros after the 70% (i.e. 70.000%.)

Any help would be appreciated.

JK
 
J

Jack Leach

Playing around with the decimal places won't change the value of the field,
just the way it's displayed. 70% and 0.7% are two very different values.

I won't say I know the best way to store percentages (myself I store them as
doubles and do all my calculations as a regular number... percentages are
just a display format as far as I'm concerned).

It seems obvious that the data in your imported db is 100x larger than what
you want it to be. In that case, I would run an update query to multiply
each value by 0.01 This should put your data where you want it.

Maybe there's another way (a different way to store percentages that
automatically does this without playing around with formats), but I'm not
sure. An update query would be my preferred method.


hth

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
J

Jack Leach

For the record...

70% = 0.7
0.7% = 0.007

Are you sure you want 0.7% on a field with a value of .6999988? You need to
change the actual value of the field if that's the case... because .6999988
is actually 70%, not 0.7%

It just seems odd that the existing data is wrong (entered at 100x more than
it's supposed to be). If I were you I would question why you want 0.7%
rather than 70%

--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 

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