Update query

  • Thread starter Thread starter Lori
  • Start date Start date
L

Lori

I have many records to update with the following: The
data in the field looks like this: ADM 1102 and I need it
to look like this ADM-1102. Basically, replacing the
space with a hyphen. The format is the same for all, 3
characters, a space, and the rest of the characters. How
can I do this with an update query? I am using Access 97.
Thanks!
 
Hi,

Kindly use the following query

update table1 set field1= Mid$(field1,1,3) & "-" &
Mid$(field1,5)

I have tried this and its working.

Thanks
 
UPDATE TheTable
SET TheField = Left(TheField,3) & "-" & Mid(TheField,5)
WHERE TheField is not Null
 
Back
Top