Remove last character

  • Thread starter Thread starter EllenM
  • Start date Start date
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
 
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
 
Back
Top