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

Trimming blank space

Status
Not open for further replies.
Nov 24, 2003
57
US
I just imported some data from the spreadsheet and it's in pretty bad condition. The biggest problem being that theres a lot of blank spaces. For example if I try to concatenate the first name and last name together it will come out looking something like this "John Smith"

Does anyone know a simple way to get rid of the spaces? Thanks.
 
Use the trim and Ltrim function. Trim eliminates spaces at the end, Ltrim for the begening.

So in a query, you have lastname and first name. So whole name would be:

WholeName: trim(Lastname) & ", " & trim (Firstname)

ChaZ

Ascii dumb question, get a dumb Ansi
 
but, to be somwhat more 'precise' in the discription of the functions referenced, see the ubiquitous {F1} (a.k.a. Help).




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top