Removing Decimals and Commas from a value

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

Guest

How can I remove comma's and decimals from a certain value using a formula in
a query?
Example: 2,352.00
Result: 235200
 
You can do it in two steps: first remove commas, then dots, using the
replace function. Here's an example that will work:

SELECT Table1.original, Replace([original],",","") AS no_commas,
Replace([no_commas],".","") AS no_dots
FROM Table1;

There might be a way to do it in one step, but I can't think of it right
off.
HTH

"Send Object Command - Two attachments"
 
Try this

In SQL
Select Round([FieldName],2)*100 As Newumber From TableName

In the query it will look like
NewNumber: Round([FieldName],2)*100
 
Send said:
How can I remove comma's and decimals from a certain value using a
formula in a query?
Example: 2,352.00
Result: 235200

First question. Is the subject a number or is it really text?

If it is a number, then it sounds like a formatting issue.
 
This is what I got to work late last night:
Val(Replace(Replace([FieldName],".",""),",","."))

Thanks to all
 

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

Back
Top