Removing Decimals and Commas from a value

  • Thread starter Send Object Command - Two attachments
  • Start date
S

Send Object Command - Two attachments

How can I remove comma's and decimals from a certain value using a formula in
a query?
Example: 2,352.00
Result: 235200
 
J

John Welch

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"
 
O

Ofer

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
 
S

Send Object Command - Two attachments

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

Top