Help with updatequery

M

Mattias

Hi

Need help with a updatequery.
I have a textfield I want to run throw all records and find the "/" and
replace it with a "-"
The "/" can have different positions in every record..

Thank you in advance

Mattias
 
J

Jeff Boyce

Mattias

One approach would be to use the Instr() and Left(), Mid() and Right()
functions to locate and rebuild the strings. Another possibility, but not
one I've tried myself, is the Replace() function -- and it depends on which
version of Access you are using.
 
D

Douglas J. Steele

In that case, you should be able to use Replace.

The SQL for your query will look something like:

UPDATE MyTable
SET MyField = Replace([MyField], "\", "-")
WHERE MyField IS NOT NULL
 
Top