Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Update Query Question

Status
Not open for further replies.

KC007

Programmer
Feb 24, 2003
4
Hi, I'm trying to update a field in a table and I've to only update the 5th, 6th and 7th Bytes of the field in the column. The field is 16 bytes long. I've to update starting from the 5th byte.
For example if the field has the following value
234 333-444 423

I've to update it as 234 555-444 423.
I've over 20,000 rows which I've to update.

I tried to use the following query but did not work.

UPDATE KCtemp SET Mid(KCtemp.BAN,5,3)="555";

Any help is greatly appretiated.
 
Hello KC007,
Try this:
Code:
UPDATE KCtemp SET BAN = LEFT(BAN, 4) & "555" & RIGHT(BAN, 8);
Good Luck, Robert
•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•
Professional, affordable, Access database solutions and assistance °•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°
 
Thanks much Solo, It worked like a charm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top