Update/add character to string

G

Guest

I have a text field that contains 7 characters. I need to put a hyphen
between characters 5 and 6, before the last two rightmost characters.

Field is xxxxxxx and should be xxxxx-xx. I know how to use replace in an
update query, but replace doesn't seem to fit. Can someone give me some
direction?
 
L

LeAnne

UPDATE MyTable
SET MyTextField = Left([MyTextField],5) & "-" & Right([MyTextField],2);
 

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