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

Trim Space before String

Status
Not open for further replies.

Steven547

Technical User
Sep 15, 2004
165
US
I have a bunch of records that have been imported into Access, but they all have a space before the string.

ie: " company...".

I want to remove the space so they resemble "company...". I know this is probably a real easy thing to do, but I can't figure it out. Anyone?

Thanks.
 
Try this (on a back-up first :) )

Update NameOfTable Set Company=Trim([Company])
 
Yea...that actually works. I was just going to post that I think I figured it out. One other question though, if there is a "." before the record: ".company" How would I remove that "period"?
 
UPDATE yourTable
SET Company=Mid([Company],2)
WHERE Left([Company],1)='.'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top