Remove last character

E

EllenM

Hello,
I'd like to remove the last character of a field, which happens to be a "#",
in an update query.

Thanks for your help,
Ellen
 
J

John Spencer

STEP 1: BACKUP your data before attempting the following.
STEP 2: BACKUP your data before attempting the following.

Without a backup you cannot restore the data if this does not work the way you
expect.

The SQL of the update query would look like

UPDATE [SomeTable]
SET [SomeField] = Left([SomeField],Len([SomeField])-1)
WHERE [SomeField] LIKE "*#"

If you can only use the query design view - post back for step-by-step
instructions on how to build this.

Hint:
Update To: Left([SomeField],Len([SomeField])-1)
Criteria: LIKE "*#"

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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