Help with updatequery

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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
 
Back
Top