How to delete leading spaces

D

DOYLE60

I have some text strings from a mainframe that have leading spaces. How do I
get rid of them in a query. I use the Trim function quite often but that only
deletes spaces after the text.

Matt
 
R

RobFMS

Here's how TRIM() is defined in Access:
Returns a Variant (String) containing a copy of a specified string without
leading spaces (LTrim), trailing spaces (RTrim), or both leading and
trailing spaces (Trim).

Therefore, if there are leading spaces, the function should take care of
them. However, I would suspect that the leading "spaces" are not, in fact,
spaces at all but some non-printable character. Have you consider this
senario?

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top