Update Query - Convert % to Number Format

  • Thread starter Thread starter Curtis Stevens
  • Start date Start date
C

Curtis Stevens

I have an update query that updates the info in a particular table. One
field I'm updating is a field with a % in it, like 70%. There will be
multiple % found in all the records, some records will have 60%, some will
have 70%.

I simply can't put "0.6" for example in the update query field as it wont
apply to all records. What do I put in that particular field of the update
query to make the approperiate change, so it takes whatever % is in the
particular record and changes it to this format "0.7" or "0.6."

Thanks
Curtis
 
Curtis

Perhaps you don't need to 'convert' the value at all...

Would it be sufficient to change the format it is displayed in?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I have tried that. I'm copying data from excel and it is in 60% format from
Excel. So I need to paste it into my table and it come out as 0.6. When I
tried different formats for that field for the table, nothing works right.
Why I have a query that updates that field and a few others for that table
after I paste the info. The other updates moves stuff around, adds fileds
together, etc.
 
Use the expression
Val(SomeField)/100

UPDATE SomeTable
SET SomeField = Val([SomeOtherField])/100
WHERE SomeOtherField is Not Null

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Thanks, that did it!
Use the expression
Val(SomeField)/100

UPDATE SomeTable
SET SomeField = Val([SomeOtherField])/100
WHERE SomeOtherField is Not Null

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

Curtis said:
I have an update query that updates the info in a particular table. One
field I'm updating is a field with a % in it, like 70%. There will be
multiple % found in all the records, some records will have 60%, some will
have 70%.

I simply can't put "0.6" for example in the update query field as it wont
apply to all records. What do I put in that particular field of the update
query to make the approperiate change, so it takes whatever % is in the
particular record and changes it to this format "0.7" or "0.6."

Thanks
Curtis
 
Back
Top