How do I insert a character in between a string in Access?

G

Guest

I have Access databse with 250 records. In one of the columns I want to
insert a single character in between a string in all 250 records. e.g. I have
"A1400" in one record and I want to make it "AI1400" , I have "P2566" and I
want to make it "PI2566". It will be better if it is done using query. Is
there any solution?
 
R

Rick Brandt

Pawan said:
I have Access databse with 250 records. In one of the columns I want to
insert a single character in between a string in all 250 records. e.g. I have
"A1400" in one record and I want to make it "AI1400" , I have "P2566" and I
want to make it "PI2566". It will be better if it is done using query. Is
there any solution?

If the new character is always "I" and you always want it in the second
position...

UPDATE TableName
SET FieldName = Left(FieldName, 1) & "I" & Mid(FieldName, 2)

(please test on a copy of your table)
 

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