Update Query - Change % to decimal

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with a feild called fuel_% and it has values entered in
percentage format:

3.0%

I need to create a query that will convert the above value(s) into:

..03

How can I do this? Thanks...

Jason Nelson
 
I have a table with a feild called fuel_% and it has values entered in
percentage format:

3.0%

I need to create a query that will convert the above value(s) into:

.03

How can I do this? Thanks...

Jason Nelson

No update is necessary unless the field is a Text field. Simply change
its Format property to remove Percent, either in the table itself, or
change the format of the Textbox in which you display the value on a
form ro report.

The data is stored as a binary number; the format merely controls how
that number is displayed.

John W. Vinson[MVP]
 
John,

The data was originally stored as TEXT so the data looks like:

11.5%

I wrote an update query which removed the percentage symbol, but I now need
to multiply each feild by ".01" so I can then change the format to
percentage. If I changed the format now thee above value would look like:

1100%

What would the appropriate update query look like then? Thanks for any help
you could offer...

Jason
 
John,

The data was originally stored as TEXT so the data looks like:

11.5%

I wrote an update query which removed the percentage symbol, but I now need
to multiply each feild by ".01" so I can then change the format to
percentage. If I changed the format now thee above value would look like:

1100%

What would the appropriate update query look like then? Thanks for any help
you could offer...

Do you want to continue to store it in a Text field? Not a good idea,
IMO! I'd suggest adding a *new* field - Number/Double or Currency
datatype - instead.

Run an update query updating it to

0.01 * Val([textpercent])


John W. Vinson[MVP]
 
Back
Top