Trim

J

Jacob

how would I trim leading quotation marks? I also need to trim them off of
the back side of another column.
 
J

John Spencer (MVP)

Use an update query to do it permanently. TRY THIS ON A COPY of your data to
make sure it works for you.

Leading Quote:
UPDATE Tablename
SET SomeField = Mid(SomeField,2)
WHERE SomeField Like CHR(34) & "*"

Trailing Quote:
UPDATE Tablename
SET SomeField = Left(SomeField,Len(SomeField)-1)
WHERE SomeField Like "*" & CHR(34)
 
S

Sandy Eastman

=Right(trim(YourFieldName),Len(trim(YourFieldName)) - 1)
will return your string without the leading character.
You only need the trim functions if there is a chance the string might have
leading or trailing blanks

=Left(YourFieldName,Len(YourFieldName) - 1)
will return your string without the trailing character
Regards, Sandy.
 

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