Replace command

  • Thread starter Thread starter CAM
  • Start date Start date
C

CAM

Hello,

In my table I have over 125,000 policy numbers for example "A18954" what I
want to do is change just the letter "A" to "D" and keep the rest of the
policy number. For example policy number "A18954" should be now "D18954".
How do I do that in a query? Many thanks in advance.

Cheers
 
First make a backup copy of your data (do it before every gobal change as
most can not be undone). Use an update query and in the design view grid for
the Updtate To row use Replace([YourFieldName], "A", "D") and run.
It will also replace an 'A' if it is elsewhere in the field like this --
A1234A to D1234D.
 
The replace function has a count option, which will allow you to decide how
many replacements to make. Make it 1.. and it will only replace the first
match.

KARL DEWEY said:
First make a backup copy of your data (do it before every gobal change as
most can not be undone). Use an update query and in the design view grid for
the Updtate To row use Replace([YourFieldName], "A", "D") and run.
It will also replace an 'A' if it is elsewhere in the field like this --
A1234A to D1234D.

--
KARL DEWEY
Build a little - Test a little


CAM said:
Hello,

In my table I have over 125,000 policy numbers for example "A18954" what I
want to do is change just the letter "A" to "D" and keep the rest of the
policy number. For example policy number "A18954" should be now "D18954".
How do I do that in a query? Many thanks in advance.

Cheers
 

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

Back
Top