Delete the last 8 characters in a field

D

David Peterson

How can I use an update query to delete the last 8 characters from a field
in my table?

The characters to delete are "Level II". Always at the end but the field
length varies.
 
C

Cheryl Fischer

You could put the following in the Update to: row of the update query:

Left([MyField], Len([MyField])-8)
 
R

Rick Brandt

David Peterson said:
How can I use an update query to delete the last 8 characters from a field
in my table?

The characters to delete are "Level II". Always at the end but the field
length varies.

Test on a *Copy* of your table first....

UPDATE YourTableName
SET YourFieldName = Left([YourFieldName], Len([YourFieldName])-8)
 

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