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

Remove all spaces in a field - SQL

Status
Not open for further replies.

RemingtonSteel

Programmer
Joined
Jul 14, 2006
Messages
65
Location
GB
Hello everyone!
I want to replace a field in SQL by removing all of the spaces.

Ex.

Field1 = ' Italy, France'

Desired Result - 'Italy,France'

Thanks.
Gene

 
Gene,

You could do this:

Code:
UPDATE MyTable SET MyField = STRTRAN(MyField, " ", "")

Not sure what you mean by a "a field in SQL", but I think the above will do what you want.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top