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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove characters from a number field

Status
Not open for further replies.

netcert

Programmer
Apr 11, 2001
115
US
I have a field that was incorrectly set as a number field then data was put in that field, needless to say numbers like 219615 ended up like 219,615.

Question is what is the syntax to go thru and update each number in those fields so the number looks like 219615? I plan to change the field type to integer or char then updating the fields, or is there a better way of doing all this?

Thx.
 
depends if there are only , in there if so you can do
Code:
update yourtable
set yourfield = replace(yourfield,',','')

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
then change the datatype of the field

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top