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

Removing leading and trailing blanks

Status
Not open for further replies.

Peping

Programmer
Aug 21, 2002
205
US
Need some help on how to remove leading and trailing blanks on a field record i.e. "AAA BBB CCC" to "AAABBBCCC" as ALLTRIM can't do the trick. Thanks in advance..
 
I use the below command all the time when I am cleaning up address and name data...

REPLACE ALL [FIELDNAME] WITH STRTRAN([FIELDNAME]," ","")

ie: REPLACE ALL LAST WITH STRTRAN(LAST," ","")



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top