Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove decimal from VARCHAR field 1

Status
Not open for further replies.

LisaRR

Technical User
May 2, 2003
31
0
0
US
Looking for a formula to remove the decimal point from a VARCHAR field.

Example:

064.10 = 06410

The formula needs to retain leading or trailing zeroes.

Thanks!
 
LisaRR,

Code:
[blue]Replace[/blue]({Table.Field},".","")

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
No problem LisaRR! [smile]

As the field was VARCHAR (behaves like a string), accomodations didn't need to be made to keep the leading and trailing zero's -- if this were a numeric field, a conversion to "Text"/"String" would need to first be performed (where this conversion ensures the leading and trailing zero's are in place). Once converted, the same Replace() function can be used.

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top